© Casey Hardman  2020
C. HardmanGame Programming with Unity and C#https://doi.org/10.1007/978-1-4842-5656-5_35

35. Advanced 3D Movement

Casey Hardman1 
(1)
West Palm Beach, FL, USA
 

In this chapter, we’ll be implementing the movement system for our player. This includes using the WASD keys to move, pressing Space to jump, and gravity to make the player fall back to the ground. In a later chapter, we’ll also implement a wall jumping mechanic that allows the player to “push off” of a nearby wall to gain extra upward and outward momentum while midair.

How It Works

Let’s get an overview of how we expect this system to work before we start poking into the code. This movement system will operate with a few concepts that are similar to that of our player movement ...

Get Game Programming with Unity and C#: A Complete Beginner’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.