I have a wood box, and a ball in this box like a labyrinth game but this wood does not have any holes. You can rotate box using arrow keys, if there's a slope > 0 than the ball rotates (gravity factor). My problem is when you rotate it too fast the ball falls under wood box due to a collision error. I decrase rotation degree to avoid this error, in this computer demo runs around 500FPS and everytihng works fine, but at home it runs around 5000FPS and the ball falls, it's like ground sucks it.. I am using a discrete dynamics world (dunno if I have to use continious one). How can I avoid this collision error at any FPS?
Here's how I rotate box:
Code: Select all
static btQuaternion sq(btVector3(1,0,0), DEGTORAD/10);
btTransform t = rbodyWoodBox.GetWorldTransform();
t.setRotation(t.getRotation() * sq);
rbodyWoodBox.SetWorldTransform(t);
rbodyBall.Activate();
btVector3 EulerRotation;
QuaternionToEuler(t.getRotation(), EulerRotation);
nodeWoodBox->setRotation(core::vector3df(EulerRotation[2], EulerRotation[1], EulerRotation[0]));