Imagine you have a situation where two objects are moving parallel to one-another and are both within range to collide with a static wall, like this:
=> 20m/s => 40m/s +==========+ +==========+ +======+ | Object A | | Object B | | Wall | +==========+ +==========+ +======+ |-- 1m --| |-- 1m --| |- 1m -|
A common method used in dynamic collision detection is to loop through all objects in arbitrary order, solve for pair-wise collision detection using relative velocities, and then move the object to the nearest collision, if any.
However, in this case, if object A is checked first against B, it would see that the relative velocity to object B is -20 m/s (and would thereby not collide this time frame). Then it would see that the object A would collide with the static wall, and the solution would be:
+==========++==========++======+ | Object B || Object A || Wall | +==========++==========++======+
And the red object passes through the blue one. So it appears to be a matter of choosing the right order in which you check collisions; but how can you determine which order is correct? How can this passing through of objects be avoided? Is ignoring relative velocity and considering every object as static during pair-wise checks a better idea for this reason?