How do I get a sprite to move up hills/slopes?

0 favourites
  • 3 posts
From the Asset Store
Complete game or template for a hill climb racing model.
  • Hi,

    How do I get a sprite with the Platform behaviour to move up/down (or align with) hills and slopes, instead of just moving in a straight line?

    I found a similar post which suggested using "Playerbox is overlapping platform > set playerskin angle to "platform.angle" but this didn't work.

  • For your slope had you rotated a rectangle or just changed the collision poly to be a slope? It sounds like that solution is based on the assumption that the slope is just a rotated version of your flat terrain.

    A similar but slightly different solution is to store a "slopeAngle" variable on the instance, then use that to rotate the characters. I believe that is how the old sonic games worked. But it obviously requires you to go over each slope, figure out the angle and then store it in the instance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Neopeo,

    The slopes/hills were added as separate sprite objects. Would the "slopeAngle" variable work in this instance? I'm still having a lot of difficulty getting instance variable to work properly.

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