I understand without problem when 2 rectangles are colliding, (I'm talking here of a really basic collision system, with one static object and one dynamic) my problem is more about what do we do once we know there is collision.
I know basically that we cancel a part of the movement to bring the dynamic object the closest to the static object.
Here is an image to illustrate my question:
How do we know if we should bounce the dynamic object vertically or horizontally to correct the movement (e.g Falling on a platform, running the feet against a small wall)
I've been able to do algorithm that worked but they were to specific to special case and velocity.
I've read that we can check what is the shortest way to move the dynamic object out of collision, but what if we have a very small vertically velocity and a high horizontal velocity....
I hope I made the explanation of my problem clear.