• Advertisement
Sign in to follow this  

How to change RigidBody rotation in Bullet Physics?

This topic is 1909 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Kinematic rigid bodies: you update a new quaternion using its MotionState. It is also possible to fetch it directly to the object (you probably want to do the former).
Dynamic rigid bodies: in line of concept you should do that by injecting forces. I don't recommend to do that.
Static rigid bodies: just don't.

Share this post


Link to post
Share on other sites
Create a rotation:

btQuaternion rotation(yaw,pitch,roll);

Then implement btMotionState, (in your class that represent the object) and in getWorldTransform do this:

worldTrans.setRotation(rotation);

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement