-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I use quaternions? #9
Comments
@cx20 Hi. I am not implement many quaternion functions right now, but you can set quaternion for model.quaternion = [0,0,0,1];
sceneNode.quaternion = [0,0,0,1]; So maybe you have to compute target quaternion by yourself right now... I will mention you after implement quaternion functions :) |
@PrincessGod I tried using model.quaternion = [q.x, q.y, q.z, q.w];
setQuaternion( ...args ) {
if ( args[ 0 ] instanceof Transform )
return this.setQuaternion( ...( args[ 0 ].quaternion.getArray() ) );
this.setQuaternion( ...args ); // infinite loop?
return this;
}, |
@PrincessGod Thanks! I confirmed that it will function properly. Also, I added the sample of this CZPG.js to the following physical operation sample list. I think that I will transplant other samples in the future. |
Below is an example of using quaternion in Three.js.
http://jsdo.it/cx20/qqSi
How do I write the code in CZPG.js to do the same thing as above?
The text was updated successfully, but these errors were encountered: