Created
February 12, 2019 19:33
-
-
Save nikolas/5cb72bc5f5bc64567e66a3f17b4b834a to your computer and use it in GitHub Desktop.
quaternion rotation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let q = orbitGroup.quaternion.clone(); | |
const rotation = new THREE.Quaternion(); | |
rotation.setFromAxisAngle(new THREE.Vector3(1, 0, 0), -Math.PI / 2); | |
q.multiply(rotation); | |
orbitPlane.normal.set(0, 0, 1).applyQuaternion(q); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment