[Solved] - Slope Issues in Autorunner

  • Hey everyone,

    I'm making an autorunner game utilizing the Platform behavior. I'm running into an issue where my player gets stuck on slopes. Admittedly, the slopes are pretty steep but not ridiculously so. The platform behavior is applied to a rectangle and the player animation is set to the rectangle's position every tick.

    I was able to find a lot of forum posts regarding issues with slopes and the platform behavior, however, nearly everyone I found either linked to a deleted forum post or a dead link in Dropbox.

    Here is a link to the project.

    dropbox.com/s/i9sjgezmeftno6h/Autorunner_slope_issue.c3p

    Things I've tried to resolve the issue:

    1. Every Tick --> Set Player Angle to 0

    Player is Overlapping Platforms at X=0, Y= 5

    Platforms Pick Nearest, spr_playerBox.X, spr_playerBox.Y --> Set spr_playerBox Angle to Platforms.Angle

    This seemed to have no effect.

    2. Player on collision with Platform

    Platforms Pick Nearest to spr_playerBox --> Player Rotate 3 degrees towards Platforms.Angle

    This also seemed to have no effect.

    I've heard mention of using multiple invisible detector sprites, but couldn't find an example of how to do this. I tried implementing it on my own, but it didn't seem to do anything.

    I'm sure this issue has a fairly obvious solution, but I can't seem to figure it out. Thanks in advance to anyone who offers help.

  • I'm still banging my head against the wall. I've tried a few different things but nothing seems to be working. Is there a maximum angle degree that can be climbed using the Platform behavior?

  • After fiddling around with your c3p, I think you must be right about the angle being too steep. It seems that anything 45 degrees or steeper causes the player object to get stuck. Are you able to make shallower slopes?

  • Maybe, the problem is I'm not much of an artist and was hoping to use this free to use art, at least for a while.

    I was hoping there was some way to "help" the platform behavior so my character could climb those slopes.

  • Hmmmm. I guess maybe you could do something manually, like... I dunno. An invisible sprite overlaying the whole slope, and when the player is overlapping it + is on the floor you move their X/Y coordinates at a 45 degree angle, perhaps? 🤔

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • the collision polygon of your slope up object is all jumbled up, set it to this and it will work

  • Wow, I can't believe I missed that. You are amazing, thank you so much!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)