Platformer Wall Jumping In Unity

If we’re not on the ground and we’re touching a wall we can wall jump. We also save the X vector for later to know which way we want to jump.
As long as the player can wall jump, if they press space they will jump in the x direction we got from the wall they’re touching. We also reset double jump here, showing how we can combine mechanics in interesting ways.
And finally we move the player!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store