I am new to the Bullet Physics Engine but after following the "Bullet Hello World Tutorial" i got some basic understanding of how Bullet works.
I have a ball/sphere rigid-body that falls to a plane nicely with gravity but when i reposition the sphere rigid-body the rigid-body doesn't get effected by the world gravity.
I am using this code in my keyboard key to reposition the sphere rigid-body
Code: Select all
btVector3 oldorigin = trans.getOrigin();
trans.setOrigin(btVector3(0,50,0));
fallRigidBody->getMotionState()->setWorldTransform(trans);
fallRigidBody->setCenterOfMassTransform(trans);
when the program begins the sphere rigid-body position goes from 50 to 0 (cause of gravity) but when i reposition the rigid-body it stays at 50
Am i missing something in my code or am i doing the reposition completely wrong?
Thanks in advanced.