Continuous Collision Detection

I was wondering what would be involved in implementing continuous collision detection so small/fast moving objects collisions are detected using Box2D as a base.

I been thinking of using circle-circle sweep test. And for objects that collide according to this test are then multiple sampled with very small steps. Though this is still not continuous.
I'm working on CCD right now. This is the main focus of v2.0.
I am looking forward to it then. With Box2D with CCD support + graphics engine will have very solid base for making any sort of 2D game.
grom358 - You can, with a little effort, write a circle-circle swept collision resolver that correctly updates the positions and velocities without subdividing, especially if you're willing to disregard forces and assume linear motion over the timestep. To get the math right, it's easiest to first transform into the frame of reference of one circle, calculate the time of impact between the moving and stationary one (just add the radius of each circle, figure out when the centers come that close together, more or less), then transform back. You then take a first time step until they are touching, resolve the coollision, and take the rest of the time step. You can fairly easily (i.e. with a bit of work) roll this all into one function, and it works pretty well as long as each body only collides with one other body per frame.

The trick, though, is to get it working with all the shapes, and make sure that things happen in the right order without too much of a slowdown. A naive way to do this is to calculate all (estimated) TOIs within your desired time step and resolve them sequentially, re-generating new TOI estimates as you go (requires a sort on the TOIs, but it's pretty straightforward at least). There are all sorts of problems with doing that, though, mainly that the amount of real time it takes you to simulate a step is unbounded, and iterative methods are trickier to implement and understand...I assume we'll see one of these methods in Box2D.

...which is all part of why this will be exciting to see in the engine. I'm not sure of any other open physics engines around right now that have continuous collisions in them (well, Bullet, but if I recall it's been disabled for the moment), so this will be extremely useful.

Original thread: https://box2d.org/forum/viewtopic.php?t=110