Let's say : I have a rigid body with the btTransfrom tA.
Code: Select all
btRigidBody* body;
btTransform tA = body->getCenterOfMassTransform();
Code: Select all
btTransform tB;
tB.setOrigin(btVector3(x,y,z));
tB.setRotation(btQuaternion(x,y,z,w));
Code: Select all
body->applyCentralImpluse(btVector(?,?,?));
body->applyTorqueImpluse(btVector(?,?,?));
Code: Select all
btVector3 linear, angular;
btTransformUtil::calculateVelocity(tA, tB, 1, linear, angular);
body->applyCentralImpluse(linear);
body->applyTorqueImpluse(angular);
Can anyone help me please ?
Thanks.