Unity/C# Challenge 53: Wall Jumping.

Alec Oney
Nov 29, 2021

Challenge: Implement Wall-Jumping.

Now that we have our elevator, we want to move on to our next section, which requires wall jumping. There are two things we want to do to set up; first we want to modify our player code to remove our ability to double jump:

with _velocity and _direction moved to global

and add in the following method to our player script:

with Gizmos selected in the editor

which will show us the perpendicular direction of whatever object we are touching:

Now, we add the tag “Wall” to our walls, and modify our player code with the following in global:

Then we modify our player update method:

and collider hit method:

Which will allow us to wall jump.

--

--