© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
C. HardmanGame Programming with Unity and C#https://doi.org/10.1007/978-1-4842-9720-9_14

14. Player Movement

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

With our new project in place, let’s start coding our player’s movement. We’re going to get a little fancy with it to exercise our programming skills and learn about some new methods.

As we mentioned in the last chapter, we want movement to be fluid – not jerky, but not slippery, either. A little bit of time to build to the maximum speed will make it less of a sudden jerk when the player begins moving. Likewise, we want some time to lose speed after you stop holding down the movement keys. It won’t be much, ...

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.