Original Post
Ive been working on a small Platform game and have basic stuff done, but my collision detection has some flaws in it.
Heres hows its done:
I compare the bounding Points to the collision polygons of the world. after finding which points are colliding with a given polygon,
Upper two are colliding and not lower two = Move down (out of ceilng)
Left two are colliding = Move right (out of wall)
Right two are colliding = Move left (out of wall)
Lower two are colliding and not upper two = Move up (out of floor)
Over all it worked good, that was before I impliemented jumping
Heres are the problems:
1.When falling down aganst a wall, lower point and upper point collide with diffrent objects so it dosn't register properly
2.When jumping up to a ledge if you fall short you can "Climb" up the rest of the way because the upper point no longer collides, this means it treats it as a floor, forcing you onto the ledge.
Further Discription:
The world consits of Objects placed at any point, each Object has a collision "polygon" the walls are vertical, and the top & bottom are any given line having any sloap, vertical lines are not allowed, all of these are ensured conditions.
I already understand my methods short comings and how it is working. But I can't seem to find a way to do it better then this. Any help would be appreciated.
"I seek knowledge and to help those who also seek it"
Edit: Claraified some sentences
[edited by - Xero-X2 on April 17, 2004 6:55:01 PM]