2.5D Platformer — #8 Wall Jumping

Objective: Give the player the ability to wall jump

Jean-Noel Seneque
2 min readOct 18, 2021
Wall jumping ability

Our player needs to get to a higher level and to do this, they need the ability to wall jump. To be able to jump off the wall, we need to know when they have touched a wall and then to be able to deflect off the wall in the opposite direction.

To determine if we are touching the wall, the Character Controller provides a method called OnControllerColliderHit.

To identify if we are touching the wall to jump off, let’s give these types of walls a tag of “Wall”

To be able to jump off in the opposite direction, we will use the hit normal provide by the collider when we touch the wall.

We need to change the Update method to factor in when we can wall jump.

Press Play and we have wall jumping!

If you enjoyed reading this article give me a Clap, also if you would like to see more, “Follow” me, so you may be notified of future releases. You may also send me a message if you need any further help.

Do you have a project in mind that you need help with, I’m available!

--

--

Jean-Noel Seneque

A Data & Analytics Consultant who is expanding into developing experiences in XR, Enterprise and Gaming space using Unity www.jeannoelseneque.com