Page 1 of 1

Set the entity's world matrix

Posted: Wed Aug 06, 2008 9:18 pm
by Domino
Hi, its me again, i would really need to be able to set or modify an entity's world matrix or rotation matrix because i want to create a wheel and be able to rotate it on one axis first (make it rotate forward) and then on a second axis (when you steer).

Thanks,
Dom

Re: Set the entity's world matrix

Posted: Wed Aug 06, 2008 9:57 pm
by Norbo
The next version allows you to set the orientation matrix directly, though internally it will simply convert it to a quaternion since the matrix is just an auxiliary variable.

You can do something similar in v0.6.0 by creating your matrix (using the rotation matrix already readable from the entity) and applying whatever rotations you'd like, then using Quaternion.CreateFromRotationMatrix to create the quaternion which can then be passed into the orientationQuaternion property.

Re: Set the entity's world matrix

Posted: Thu Aug 07, 2008 2:26 am
by Domino
Thanks again for the fast reply. I will try that :P