Determining which side of platform Player collides with
This is a platform game
I have a player object ( blue square ) which moves along the x ( left/ right movement ) and y ( gravity/ jumps ) axis ( image below )
I also have a platform object ( black square ) which the Player should interact with, like a solid box ( image below )
http://i43.tinypic.com/j63q75.jpg
---
My event editor should looks like this, with collition detection before objects move ( for specific reasons i wont get intoo now )
If Player overlaps Platform
- *reposition Player
Allways --->
- Player move X
- Player move Y
----
What i cant grasp is how i can determine when Player is colliding with the topside og the Platform ( image below )
http://i43.tinypic.com/k2yc1h.jpg
and when Player is colliding with the left side of the Platform ( image below )
http://i40.tinypic.com/20pwkno.jpg
---
Any sugestions or ideas on how to tackle this would help alot