# Rigid body collision, 3 circles in contact

I'm working on a 2d physics simulation. It's a continuous time simulation, that is, it uses swept shapes over the time-frame and geometrical/vector 'analysis' to determine most immediate time of contact. The world is then stepped forward to that point and collisions are resolved before proceeding to step the world forward to the next time of collision.

I do not use relaxation techniques or any kind of intersection resolution. The objects are moved to contact states and contact events are resolved as collisions.

I have tried a CONTACT_RANGE of 0.001f down to 0.00001f. This value determines whether objects are in contact. Lowering this value leads to less overlap states, but presumably at some point, lowering the value further will lead to the simulation missing contact events because inaccuracies will lead to the systems of bodies being stepped into the discrete or overlap state.

Now, to the problem, the simulation seems to compute the outcome of collisions between 2 bodies (circles in the case I'm looking at), correctly. But I have not correctly dealt with 3 or more bodies being in contact.

In the past, I did not deal with momentum / KE correctly, but I did constrain velocities such that multi-body systems would not intersect in the next sub-frame. But now that I have a correct solution to 2 body collision, I want to do it properly for more bodies.

I'm not sure how to proceed. I have read an interesting suggestion, that in reality, no collisions are simultaneous, and they can be dealt with one after the other. Is this true ?

Could I simply compute the resultant velocity of a body from one contact, then do the same with the next contact etc?

And would that lead to the same solution as though I computed velocity in one step, from all contacts simultaneously?

Or do I need a single function for solving the velocity from multiple contacts?

Any guidance is appreciated.

Gavin

• "Could I simply compute the resultant velocity of a body from one contact, then do the same with the next contact etc?". That will do, as far as I know about physics. Commented Mar 20, 2014 at 1:25
• The solution is quite complex as your need to build a system of equations to find all the contact impulses when happening simultaneously. Commented Mar 20, 2014 at 3:56
• See here and here on how to model such systems. Commented Mar 20, 2014 at 13:20