Hi!
I have a rigid body that I would like to make upright over some period of time. So I'm trying to figure out how to calculate the necessary torque to apply that will eventually get the body to stand up.
If someone could point me in the right direction that would be great.
thanks a lot
Calculating a compensating torque
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Calculating a compensating torque
You could use the Bullet/src/LinearMath/btTransformUtil.h to calculate the change in angular velocity, and apply a torqueImpulses to the rigidbody.Digini wrote:Hi!
I have a rigid body that I would like to make upright over some period of time. So I'm trying to figure out how to calculate the necessary torque to apply that will eventually get the body to stand up.
If someone could point me in the right direction that would be great.
thanks a lot
You can also use the btHingeConstraint (use hinge->setAngularOnly(true) to only effect the rotation, not position).
Hope this helps,
Erwin