Set the entity's world matrix

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Domino
Posts: 8
Joined: Fri Aug 01, 2008 3:44 am

Set the entity's world matrix

Post 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
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Set the entity's world matrix

Post 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.
Domino
Posts: 8
Joined: Fri Aug 01, 2008 3:44 am

Re: Set the entity's world matrix

Post by Domino »

Thanks again for the fast reply. I will try that :P
Post Reply