Sticking to the wall

image
Can you tell me how to make the player get into the wall and stick to it?

1 Like

Hi there is a lot of ways to do this, the easy way is to check if the player is in collision with the wall then forbid left/right and just allow up/down but you need to add a sprite to act as wall.

Other option is to add a custom movement behavior to your player and when he is in collision with the wall disable Platformer and enable Custom movement just to go up/down.

Another is if the player is in collision with wall make the X position of the player to the wall X position and control that with an object variable so if the user press up/down or jump let the player X to be different than wall x.

4 Likes

I did it something like this (it grabs the wall while falling and then starts to fall slower and also giving the chance to jump once)


But if you want the Object to move on the wall then maybe you can use forces (but as @UlisesFreitas said, disable the Platformer Behaviour at first).

1 Like