How can I change (Pitch, Yaw, Roll) of a RigidBody in Bullet Physics?
I am using DirectX and C++.
How to change RigidBody rotation in Bullet Physics?
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.
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.
Previously "Krohm"
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);
btQuaternion rotation(yaw,pitch,roll);
Then implement btMotionState, (in your class that represent the object) and in getWorldTransform do this:
worldTrans.setRotation(rotation);
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement