Tutorial 2 Pt2


Walk

For the walking animation the goal was to activate it whenever the W key is held down. To start with code called "MyThirdPersonController" was made. As seen below this code uses transform.rotate and SimpleMove in combination with rotateSpeed and Speed set as Public Floats to control the movement and rotation of the character as the W, A, S, D keys are pressed.

 This code automatically adds a Character Controller Component when added to the character object as it is put as a requirement on line 4, this component is essential fro using Simple Move.

The radius of the Character controller was modified to comfortably  encompass the character object.

Leave a comment

Log in with itch.io to leave a comment.