Skip to content

Instantly share code, notes, and snippets.

@chandlerprall
Created May 12, 2014 16:04
Show Gist options
  • Save chandlerprall/b92605dec99a45fd4c13 to your computer and use it in GitHub Desktop.
Save chandlerprall/b92605dec99a45fd4c13 to your computer and use it in GitHub Desktop.
var foo = new THREE.Object3D();
foo.quaternion.set( 0, 1, 0, 1 ).normalize();
var direction = new THREE.Vector3( 1, 0, 0 );
direction.applyQuaternion( foo.quaternion );
console.log( direction.x + ',' + direction.x + ',' + direction.z ); //0,0,-0.9999999999999998
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment