If I write:
const cube = new THREE.Mesh(
new THREE.BoxBufferGeometry(50, 50, 50, 1, 1, 1),
new THREE.MeshPhongMaterial({
color: 0xffff00
})
);
cube.matrix = new THREE.Matrix4();
cube.matrix.set(1,0,0,80, 0,1,0,0, 0,0,1,0, 0,0,0,1);
that doesn’t work. If I write:
const matrix = new THREE.Matrix4();
matrix.set(1,0,0,80, 0,1,0,0, 0,0,1,0, 0,0,0,1);
cube.applyMatrix4(matrix);
that works but I’m not sure if it’s the same as setting .matrix
property on an Object or it’s a .matrixWorld
or both.
What’s the proper way to make a new object and set a local matrix so it takes hold?