Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have seen games like latest "2'5D" sonics that handle collision detection at platform corners pretty well. The problem I'm having is that my game uses an ellipsoid as my player's body to let it move on slopes, etc... But when it gets close to the end of a platform (wich has a rectangular collider) the collision is not correct because the player collider is not rectangular too. It is a bit difficult to explain, here a pic:

http://imageshack.us/photo/my-images/849/77056947.jpg

Hope the explanation is clear.

How do they do collision on the edges to get an smooth movement and don't seem like the player is falling through the edge?.

share|improve this question
add comment

1 Answer

I haven't actually done this myself, but I would assume that most games 1) don't actually use physics simulations for the player himself, instead preferring to control him manually to get the exact feeling down and 2) I would guess the collision is handled by a ray instead of a oval.

If you have just a single point you're testing at the player's feet then you can avoid the issue of going off corners, but still be able to work on slopes properly.

Somewhat unrelated, but worth sharing: tuning Canabalt (includes talking about how their collision detection works).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.