[SOLVED] Object does not move after a period of time
Posted: Thu Oct 01, 2009 10:29 pm
I have a strange problem. If I am moving my object all the time, everything works well.
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:
I really hope you can help me, because I do not know what could be wrong.
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;