Upgrading Player Movement (New Unity Input System)

Chris Daley(Desonn)
2 min readFeb 25, 2022

let’s take a look at how we go about using the new input system in a game setting. We have a project here that has been built with a character controller. Let’s take a look at the original script and see how we would do to change it

It is the characters movement with the horizontal and vertical inputs, set the animation to work if there is character movement and keeps the player grounded.
To begin the transition to the newer input system, we first need to create an input map and a new 1D axis:

Once we have created the input class script, we go into the player script and make the changes that are needed.

What we have done is set our move like before, to the float that is created when we press WASD. From here, our velocity is equal to that multiplied by the speed. Finally, we set the players movement to become a movement along z axis, while he rotates along the y axis, providing the player the ability to turn around with the A and D keys.

We have created proper movement of our character that works

--

--