Broken wall climbing with platformer character

When testing out the movement of my platformer character, I noticed that you are able to climb up walls by jumping while looking in the opposite direction in which you jumped the first time, however this only works if you had touched a wall on the first jump. A gif is attached below
Preview of Super Level Maker 2023-01-19 14-54-53 (1)

I think this might be your issue. When your sprite flips directions part of it becomes stuck inside the wall. In your case, I think it’s the robots head.

I think one possible fix is making sure the sprite is centered including the collision mask and center points. So, when it flips it fills the same exact space.

The collision mask rarely needs to be an exact match to the image.


Sorry for taking forever to respawn. I do not think this is an issue on my end, as the collision sprite is one solid rectangle, and my sprites points are centered. (The lower part of the robot’s body are a different sprite, but they do not have any collision at the main body already masks the lower area)

It might loot a little weird due to how I made the pixel art, but the points are still in the middle of the collision mask.

Edit: wait you are completely right the points are off compared to the collision mask, thank you!
Screenshot 2023-01-31 2104221
Screenshot 2023-01-31 210403

1 Like