I am looking for a conceptual solution to my problem. It's a simple platformer-alike game where player can move horizontally during free-fall.
In the first case, from game experience point of view, the player should land on top of the box; and in the other case he hit the left edge, hence the player should fall down.
However, from my code point of view ("real behaviour"), both those collision detection cases are identical. I am not sure how to separate them.
In both cases the vertical velocity is positive (falling down) and the user is moving with some fixed positive horizontal velocity. (moving right)
From a collision-standpoint the two cases are identical, I think. How can I tell whether I should put the player on top of it or let him fall?