Jump to content
  • Advertisement
Sign in to follow this  
MichaeldeJong

physics timestep problem

This topic is 2550 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I made my own physics system for my game, but the problem is the position of the player is not synchronized when theres a timestep difference. Let's say you will be able to jump a lot higher when the timestep
is higher. (top left corner is the formula for calculating the new position)
Howker_timestepproblem.PNG

Share this post


Link to post
Share on other sites
Advertisement

Hello, I made my own physics system for my game, but the problem is the position of the player is not synchronized when theres a timestep difference. Let's say you will be able to jump a lot higher when the timestep
is higher. (top left corner is the formula for calculating the new position)

For proper physics calculations you need to do use proper integration algorithm. In physics engine you often do an approximation of an integration, the precision depends on the timestep you choose. One of the most simple integration approximation is the euler integration, more advanced are verlet or runge-kutta integrations.

To answer your question: Yes, this is the expected result.
First try to reduce the timestep to get better results, when this is not enough, try to use verlet or runge-kutta integrations.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!