Time Corrected Verlet Integration and too big timesteps

人走茶凉 提交于 2019-12-06 06:35:18

问题


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?


回答1:


From what I understand, the time-corrected verlet integration only helps when you have a fluctuating framerate, but it won't help if your base framerate is too low.




回答2:


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



来源:https://stackoverflow.com/questions/10139670/time-corrected-verlet-integration-and-too-big-timesteps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!