Skip to content

Instantly share code, notes, and snippets.

@nikolas
Created February 12, 2019 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nikolas/5cb72bc5f5bc64567e66a3f17b4b834a to your computer and use it in GitHub Desktop.
Save nikolas/5cb72bc5f5bc64567e66a3f17b4b834a to your computer and use it in GitHub Desktop.
quaternion rotation
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