2.5D Platformer — Simple Walljumping #6

Jumping towards new heights

Another basic (and popular) feature in a Platformer is Walljumping. Today, I will show you how you can start implementing it in your projects.

Quick Note:

Because Walljumping applies a force to the controller, if you set up your controller like mine that handles the movement through input rather than momentum, you won’t be able to control your controller mid-air. This can be quite frustrating as responsiveness is videogames is very important.

But because this is a mini-tutorial, I’ll only spare the information you need to walljump.

You’ll only need a Character Controller component. Using the integrated method OnControllerColliderHit, we can easily check for walls. You can do this with Raycast if you’re unsure about using this method.

For our controller, we’ll only allow walljumping if the player is not Grounded and the hit point normal angle is 90 degrees. We’ll store the normal to push the controller off the wall.

In our JumpInput method, we’ll add the WallJump functionality to make this work. Depending on the side of the wall we’re colliding, we’ll want to push off the controller from the wall with a new HorizontalSpeed and a new VerticalSpeed.




Junior Unity Developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium


Handling Complexity: Using Sagas to Provide Transactional Support for Distributed Systems

How to build a stock trading app?

Writing Well: A Must-Have Skill That No One Teaches Software Developers

Line graph that shows career with writing and without writing

Entering GitOps 2.0 with Codefresh and ArgoCD

How Java and C Plus Plus are used in Industry

The easiest way to use divergences in your own TradingView strategies

Let’s Build a Real-Time Bitcoin Price Notification Project using Python

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
Pablo Gómez Platón

Pablo Gómez Platón

Junior Unity Developer

More from Medium

Guide: Creating NFTs with the new NeftyBlocks CREATE feature

Violet and her…….

My journey becoming a Unity game developer: Audio Manager: Background Music, Game Over Cutscene…

Cookie Rush Kingdom Cookies