How to make my character stick to walls and jump off of it?

Hi guys I am trying to get my character to stick to walls and jump off of them .e.g. Super Meat Boy were you are able to stick to the walls an then jump from them as seen in the picture below any help is greatly appreciated =).

21137-1990_fullsize.jpg

I don’t know how far your Character is able to move by now, but normaly i would use a Line Trace in the direction the character is moving and check if there is a wall. Now, if we are jumping AND the distance between the wall and the character is less than… let’s say 0.1f, you make him able to jump again.

If you are using a bool to determine if we are in the air/already jumping you can then set it back to being able to jump.

ty i will giv that a try.

When character hit the wall (means Hit Event being called), do below:

  1. Set “Gravity Scale” in MovementComponent to 0.

  2. Set character to face the direction of hit normal, and play a loop animation such as “Sticking on the wall”

  3. Set a bool such as “isSticking” to True

  4. If “isSticking” is true, you could jump again ,DO NOT use build-in Jump node because you are in air, just “Add Impulse” to character, the impulse is (0,0,jumpHeight).

  5. Set gravity to 1 and turn off the “isSticking”.

Hope helpful