# How do I resolve a collision involving more than two objects?

I have working functions that compute the overlapping polyhedron, contact points, depth of penetration (DOP), etc. of the overlap between two objects with convex polyhedra shapes.

I know how to resolve the collision between two colliding movable objects, for example by moving one of them DOP units along the penetration normal.

Problem: What is a simple method to resolve collisions between more than two objects? For example, let's say objects A, B and C are in collision such that A overlaps with B, and B overlaps with C. If I move A to resolve its collision with B, then A might overlap with C (or any other object in the scene), and now if I resolve the collision between A and C, one of them might overlap with another object. To me, it seems an endless chaining effect. Is there any standard algorithm to resolve collisions between more than two objects simultaneously (batch collision resolving) such that at the end of the day, there are no pairs of objects overlapping?

Note: In my problem statement it is assumed that a scene initially filled with possibly overlapping objects with convex polyhedron shapes is given to my collision resolver engine.

• possible duplicate of How to separate colliding objects without creating more collisions Commented Aug 29, 2014 at 14:05
• @Icy: Thanks for the link. I have already seen that question. But my problem is different. In my case, the initial configuration (poses) of the objects given to my collision resolver engine might be overlapping. At the first step, I would like to be able to make all overlapping volumes between each pair of objects zero, and then running a physics simulation for the resolved configuration... Commented Aug 29, 2014 at 14:11
• @Rasoul That still makes this a special case of the more general problem.
– Anko
Commented Aug 30, 2014 at 20:57