Adding Animation to the Player

Setting Up the Animation Controller and replacing the player 3D model

In this article we will be focusing on upscaling the player 3D model and also attaching an Animation Control.

Applying the 3D model

For our use, we are basically going to add the pre-rendered model as a child object of the player. Therefore it can be organized properly in the hierarchy without interfering the parent object.

Next we need to readjust the capsule collider and also the Nav Mesh Agent to fit the size of the new 3D model.

Using the Radius setting, we can enlarge or shrink the collider sizes

Creating the Animation Controller

Within the folder which houses all of the preset animation (or if you are starting from scratch, create a new folder that would potentially house all your animation assets).We are going to right click and create Animation Controller, this can be named anything you like, I named mine “Darren”.

Once you have created the controller double click it to open up the Animator Window. Now it is time to populate the Animator Controller, we can do this by simply dragging and dropping the premade animation clips. The very first clip you add will be set to the “Default” animation.

To change the default state, highlight the desired state and right click. Select “Set as Layer Default State” and it will automatically change.

In the Next Article we will focus on making the animation transitions where can can switch between idle animation and walking animation which are all triggered by script.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Simon Truong

Simon Truong

A Designer, an Illustrator and a massive tech geek aspiring to become a professional Unity Developer.