Original Post
I''m working on a small 2D platform side shooter game.
I know how to deal with ''normal'' collision detection but my main problem is that after the player starts falling... he keeps on falling... then he reaches the floor.
At this point the player should collide with the floor and stop.
In order for the player to accurately collide with the floor without going a couple of pixels through I have to predict the player''s location. That''s not the problem though.
The problem is when I need to predict collision when the player is moving both in the y axis and the x axis.
When the player is about to collide, does he hit the floor, the wall and at which point exactly?
For example:
The player is 2 pixels away from the wall, and 6 pixels above from the ground moving at a speed that is: vX=3, vY=8...
I somewhat have an idea of how to do this, but it seems WAY too long. In this case the player would hit the wall, but at which point? And is there a shorter way to do this?
If anyone could just point me in the right direction.
Input is greatly appreciated.