As a hobby, I'm developing a 2D game. I've got some basic collision detection implemented using a separating axis method. When two objects collide, I project one of them out of collision along the axis that has the least amount of overlap.
The problem I'm encountering is that when an object is moving fairly quickly the axis that has the least amount of overlap isn't always the correct direction. The best example I have is when an object is moving down (along the + y axis) due to a simulated gravitational pull and collides with an environment object close to an 'edge' (as in the edge of a cliff). If the object was falling quickly enough, the axis with the least amount of overlap winds up being the x-axis, and the object is pushed sideways along the x-axis.
What is the best way to handle fast moving objects? I've considered moving the falling object in small increments, which seems like it adds a lot of extra overhead. I've also considered giving the environment objects a 'preference' of which axis to project the falling object, but that seems messy and error prone.
Is there a way to do it without adding a lot of extra overhead?