Hi all, so I have a series of vertices stored in a BufferAttribute in which I need to translate 100 units on the z axis. I see that there’s an applyMatrix4 method in which I can apply a 4x4 transformation matrix to accomplish exactly this. I apply the matrix, which seems to correctly shift my 3d Model, but then flattens it.
After [Shifted correctly, but flattened]
Here’s my code, if that helps. Thanks.
let origins = loadedGeometry.attributes.position.clone(); const m = new THREE.Matrix4(); m.set(1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 100, 0, 0, 0, 1); origins.applyMatrix4(m);
Ah, my transformation matrix had the 0’s and 1’s in the wrong places. Haha thanks all!