My journey becoming a Unity game developer: Player Movement-3D model setup with an Animator Controller
Objective: Setup Darren’s 3D model with the Player game object. Also, create an Animator Controller attached to Darren for his animations to play.
Inside of the Prefabs folder is a 3d model of Darren which will be used to represent the player game object. To use the Darren model, select the Player game object and turn off the Mesh Renderer of the player’s capsule. We will only see the Capsule Collider in the Scene View now.
Place Darren’s 3D model inside of the Player game object as it will be a child of the Player object. Scale him to the appropriate size compared to the other characters in the game which was 2 for us in the x, y, z values. Adjust the Capsule Collider and NavMeshAgent to the player’s body dimensions inside of the Player game object.
In the Game folder under the Animations folder there is a folder named Darren inside of the Assets folder. Darren has 3 animations named Idle, Throw, and Walk that we will use for him in the game. But, in order for these animations to work we need an Animator Controller assigned to Darren’s game object.
Let’s create an Animator Controller by right-clicking on the Darren folder inside of the Animations folder and name it Darren. Then in the Darren 3D game object, click on the Add Component button and select Animator for the Animator component to be assigned to Darren. Place the Animator Controller from the Darren folder in the Animations folder into the Controller slot under the Animator component. Double click on the Darren Controller to open the Animator tab window and drag the Idle animation clip into the window.
When we play the game, we will see Darren going through the Idle animation in a looping sequence.
Next time we will work on setting up the Animation Behaviour Tree with the Walk and Idle animations used in particular.