3 ms·
Could be—it's been a while since I read about the technique. I thought a game engine doing this figured out the collisions when the trajectories changed so the
by mLuby 5y ago
Could be—it's been a while since I read about the technique.
I thought a game engine doing this figured out the collisions when the trajectories changed so then it's just a matter of rendering those known effects (rather than the more naive approach of checking each tick or frame whether anything's collided). Note that doing this at impulse can cause the game to slow down when many objects are moved at the same time, like an explosion. I think it works pretty well because most game objects are stationary, or even immovable; also moving objects are rarely subject to new accelerations—they stay ballistic.
But IANAGameDev, so do correct me if you know something about this technique.
t=0
cube1 p=5,0 v=0,0 m/s
cube2 p=1,0 v=2,0 m/s
// Game knows cube1 and 2 will collide at t=2
t=1
cube1 p=0,0 v=0,0 m/s
cube2 p=3,0 v=2,0 m/s
cube3 p=0,0 v=5,0 m/s
// Game knows cube1 and 2 AND 3 will collide at t=2
t=2
all cubes hit at 5,0
- plopz 5y agoIts pretty difficult to do quickly and with numerical robustness, specifically when you have rotation. Here's a talk by the creator of Box2D while he was working for Blizzard on continuous collision detection. https://www.youtube.com/watch?v=7_nKOET6zwI https://www.youtube.com/watch?v=7_nKOET6zwI
- mLuby 5y agoThanks, that was an interesting talk. Apparently what I was describing is "time of impact" as that talk describes here: https://youtu.be/7_nKOET6zwI?t=495 https://youtu.be/7_nKOET6zwI?t=495