But if I don't move my object for a short period of time, it seems to be sticking in the other objects and is not movable anymore.
But now I tried to disable gravity and disable the collision response and I still got the same problem.
So do you know, what could be wrong with it?
Here some code:
Code: Select all
// update the physics world
physics_world_->stepSimulation( game_env_.render_time, 10);
Code: Select all
// move the player
force_.normalise();
rolling_force_.normalise();
force_ *= force_strength_ * game_env_.render_time;
rolling_force_ *= force_strength_ * game_env_.render_time;
body_->applyCentralForce( BtOgre::Convert::toBullet(force_) );
body_->applyTorque( BtOgre::Convert::toBullet( rolling_force_ ) );
force_ = Ogre::Vector3::ZERO;
rolling_force_ = Ogre::Vector3::ZERO;
need_update_ = false;