Recently, I discovered another strange behaviour: My test scene simply consists of a box rotated 45 degrees around local z-axis, placed 10.0 meters above the ground.
Code: Select all
//...
m_dynamicsWorld->setGravity(btVector3(0,-9.81,0)); //<-- HERE IS THE PROBLEM!
//...
btRigidBody* ground = localCreateRigidBody(btScalar(0.),groundTransform,groundShape);
ground->setRestitution(0.5);
ground->setFriction(0.5);
//...
btRigidBody* theMagicBox = localCreateRigidBody(btScalar(10.0), trans, boxShape);
theMagicBox->setFriction(0.5);
theMagicBox->setRestitution(0.5);
If I set the gravity vector to -9.81 in y direction, I don't get any bounciness within this setting. If I set gravity to
I do get bouncing, but I still can't adjust its amount. Strange, isn't it?