Day 99: Character Animation Part 2
Objective: Add the animation to the character
Yesterday we downloaded the animation we will use and set it up to be used. Today we will add it the model to display the animation. The very first thing we need to do is create an animation Folder for the Game.
Inside that folder we will right click and create a animation controller.
I named mine Player_Anim_Controller. Once it is done and it is selected, under the Animator Window we should get a couple of states as seen below.
Now we need to take the controller and assign it to the model animation component.
Once that is done, move back to the Animator and drag in the Animation we duplicated in yesterdays article. We will now have an orange Idle state showing up.
If we play the game the animation will only run once.
The reason it runs only once is because it is not set to Loop. To fix that go back to the animation in the project view, select it and in the inspector window set Loop to true by checking the box.
Now once we run the game he will play the animation forever, as long as the game is running. We have added an animation from mixamo and got it working on our model!
Thank you for reading and have a wonderful day!