How do I step up by one pixel?

0 favourites
  • 5 posts
From the Asset Store
This sound library contains 200 stereo and 200 mono sounds of monster steps on different surfaces. Contains surfaces su
  • Default Platform Movement behavior

    Player can normally walk onto things, but if he's standing (not moving) next to an object that is 1px higher than the ground he doesn't walk up to it. Is there a method to determine the height of an object's "step" (in this case, the player object using Platform behavior)?

  • this normal roracle since it triggers a collision even if its one pixel


    you can probably workaround this by checking if the player is colliding then set the Y of the player to that objects y+objects pixels height

    since this will act like a teleport it wont work very well with bigger object height than few pixels

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well I'm obviously off by 1 pixel and I might just change it to where it doesn't go up that far. It's an elevator so it shouldn't matter too much. I have it determine how high and low to go based on a variable. I'll just set that variable to one pixel lower/higher (y axis is so confusing some times lol)

    Also I should make note: Though it's 1 pixel higher than the platform, if my character is walking he will step up onto it. But if he's starting right next to it, he will not.

  • if you can share a capx i can help you make it work better

  • I'm encountering the same issue.

    On a horizontal sprite which has a 45° angle (purple), the player can walk up.

    On a slope which was drawn that way (blue), the player can't.

    What is the best way to make the player properly walk up on the blue ones ?

    edit : okay my bad, the collision box were messed up on the blue ones. I had to remove some points and now it works perfectly. Also, it was not the same issue as roracle.

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