Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Time Corrected Verlet Integration and too big timesteps

i use a Time Corrected Verlet Integration found here: http://www.gamedev.net/page/resources/_/technical/math-and-physics/a-simple-time-corrected-verlet-integration-method-r2200

But when my ball is on a wall (horizontal wall, ball upon it and the acceleration is directed down) for a some time, my game cannot recognize the collision in the right way and the ball goes down. If I put a fixed cap to deltatime like 1/60 it seems to work.

I think the problem are too big timesteps. But the time corrected verlet integration is done to avoid too big timesteps, it is right? If yes, why I need the time cap?

like image 532
thebestneo Avatar asked Jan 16 '23 22:01

thebestneo


1 Answers

The equation given in the article is broken, erroneous. When I derive it, I get this:

x = x + (x – xl)*h/hl + a*h*(h + hl)/2

instead of his, which is this:

x = x + (x – xl)*h/hl + a*h^2

and here's an example using his charts: http://i.stack.imgur.com/TL6HT.png

like image 68
Aru Avatar answered May 01 '23 23:05

Aru