Correct Manner to Apply Forces
-
- Posts: 1
- Joined: Sat Nov 21, 2015 5:09 pm
Correct Manner to Apply Forces
Where can I find a simple demonstration of applying forces to bodies? Seems like this topic should be included as a demo.
-
- Posts: 350
- Joined: Sat Jul 04, 2015 10:33 am
- Location: Bern, Switzerland
Re: Correct Manner to Apply Forces
If you have a simple btRigidBody, you can use the method: This applies a central force and additionally applies a torque depending on what you set in relative position.
To apply a torque, you can use: Torque can only be applied to the center of mass (that is how it is defined in physics, not a limitation of Bullet Physics).
What exactly do you need?
Code: Select all
void applyForce(const btVector3& force, const btVector3& rel_pos)
To apply a torque, you can use:
Code: Select all
void applyTorque(const btVector3& torque)
What exactly do you need?