the*_*neo 4 time physics collision verlet-integration
我使用此处的时间校正Verlet集成:http://www.gamedev.net/page/resources/_/technical/math-and-physics/a-simple-time-corrected-verlet-integration-method-r2200
但当我的球在墙上(水平墙,球在上面并且加速度向下)一段时间后,我的游戏无法以正确的方式识别碰撞并且球落下.如果我把固定的上限设置为delta时间,如1/60,它似乎有效.
我认为问题是时间太长了.但是时间校正后的verlet集成是为了避免太大的时间步长,这是对的吗?如果是的话,为什么我需要时间上限?
文章中给出的等式是错误的.当我得到它时,我得到了这个:
x = x + (x – xl)*h/hl + a*h*(h + hl)/2
Run Code Online (Sandbox Code Playgroud)
而不是他,这是:
x = x + (x – xl)*h/hl + a*h^2
Run Code Online (Sandbox Code Playgroud)
这是一个使用他的图表的例子:http: //i.stack.imgur.com/TL6HT.png