I'm new to Bullet and physics simulations in general. My problem is how to correctly use applyForce, I have a box ( 3x0.5x1 ) and want to push it with a force on only one axis - to simulate something like an engine.
I've tried alot of different things, like
Code: Select all
1) body->applyForce(btVector3(100, 0, 0), btVector3(1.5, 0, 0));
2) body->applyForce(btVector3(100, 0, 0), btVector3(0, 0, 0));
3) body->applyForce(body->getCenterOfMassTransform() * btVector(100, 0, 0), btVector(1.5, 0, 0));
Basicly the same thing applies to applyTorque, the version I'm using now is just
Code: Select all
body->applyTorque(btVector3(0, 20, 0));
I've set the linear dampening to 0.2 and angular dampening to 0.4 to stop the sliding, but that may not be optimal