2
\$\begingroup\$

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 (which has a rectangular collider) the collision is not correct because the player collider is not rectangular too.

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?.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

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).

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .