const quaternion = new THREE.Quaternion(); // create one and reuse it quaternion.setFromUnitVectors( v1, v2 ) const matrix = new THREE.Matrix4() // create one and reuse it matrix.makeRotationFromQuaternion( quaternion ) object.applyMatrix( matrix ) // or object.applyQuaternion( quaternion )
How to find rotation matrix between two vectors in THREE.js
Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question. Provide details and share your research! Asking for help, clarification, or responding to other answers. Making statements based on opinion; back them up with references or personal experience. To learn more, see our tips on writing great answers.
https://stackoverflow.com/questions/25199173/how-to-find-rotation-matrix-between-two-vectors-in-three-js
