Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualBaneTrapper

Posted 05 December 2012 - 05:13 PM

One error may be that your position is an int, if movement is less then 1 pixel per loop, its not gonna move.

Also how much is your (m_speed), also (m_direction.x)
movement.x = (m_direction.x * m_speed) * p_secondsPerFrame;

I also have problems finding from where you call (void Ball::tick(const double& p_secondsPerFrame)) don't know what value is passed.

Check this up http://gafferongames.com/game-physics/fix-your-timestep/ that should do.

#1BaneTrapper

Posted 05 December 2012 - 05:13 PM

One error may be that your position is an int, if movement is less then 1 pixel per loop, its not gonna move.

Also how much is your (m_speed), also (m_direction.x)
movement.x = (m_direction.x * m_speed) * p_secondsPerFrame;

I also have problems finding from where you call (void Ball::tick(const double& p_secondsPerFrame)) don't know what value is passed.

Check this up http://gafferongames.com/game-physics/fix-your-timestep/ that should do.

PARTNERS