Make the player run onto stairs smoothly
Posted
by
misiMe
on Game Development
See other posts from Game Development
or by misiMe
Published on 2014-05-10T12:46:52Z
Indexed on
2014/06/04
9:40 UTC
Read the original article
Hit count: 155
I have a 2D Platform game, where the player Always runs to the right, but the terrain isn't Always horizontal. Example:
I implemented a bounding-box collision system that just checks for intersections with player box and the other blocks, to stop player from running if you encounter a big block, so that you have to jump, but when I put stairs, I want him to run smoothly just like he is on the horizontal ground. With the collision system you have to jump the stairs in order to pass them!
I thought about generating a line between the edges of the stairs, and imposing the player movement on that line... What do you think? Is there something more clever to do?
© Game Development or respective owner