Collision between multiple objects
I'm writing a simple physics system for fun, and I've run into a problem that has me stuck. The basic algorithm now is: Move an object Check for collisions If there was a collision Move the object the minimum distance to resolve the collision. Adjust the velocity based on the normals, masses, etc I have one moving body moving toward two, static, massless, bodies. The moving object is translated in one step to collide with one of the bodies. I respond by finding the smallest distance I can move so that they are no longer colliding. In this case, that means moving the dynamic body straight down.