Player Movement Controller

If you click on the Player Without Weapon prefab we have put into our scene, you will see that it has a Character Controller and a PlayerMovementController.cs component. This is what makes our player walk, sprint & jump.

You can take a look at the inside of PlayerMovementController.cs script to see how the movement is handled. It has a very basic state-machine setup, so that we can listen to events to see when the player's movement state has changed. You can play with the movement speeds, jump height, gravity etc. to change the behavior of the movement script.

Last updated