I've got a simple application with a single btRigidBody to which I apply forces by pressing keys. If I set the world gravity to something else than 0, it works fine, but if i set the gravity to ( 0,0,0 ) during the physics initialization then my object doesnt move when I apply forces.
I just do the following :
Code: Select all
m_PhysicsWorld = new btDiscreteDynamicsWorld( m_Dispatcher,m_Broadphase,m_Solver,m_CollisionConfig );
m_PhysicsWorld->setGravity( btVector3( 0,-10,0 ) );
Code: Select all
if ( m_Cube )
{
m_Cube->applyForce( btVector3( 0,100,0 ), btVector3( 0,0,0 ) );
}
thanks in advance,
Hurricanes.