How do I prevent players from jumping outside of the map?

I’m working on a 2D platformer and one thing I noticed is that if you jump against the wall, your character starts to slide:


And (for obvious reasons) I don’t want players to be able to do this. So, how to I prevent players from going outside of the map?

1 Like

You could put an invisible wall to prevent the player from being able to move out the bounds of your 2d area

4 Likes