Skip to main content
GameDev.net gamedev.net
🔒 Locked

physics timestep problem

Started by MichaeldeJong Dec 23, 2011 at 10:03 AM 0 replies 850+ views
Original Post
MichaeldeJong
MichaeldeJong
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
Ashaman73
Ashaman73

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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.