Animating the NPC
At the moment, the chick floats around the scene without a walking or running animation. We'll change that now by animating the chick as it walks around the scene. The chick will transition between a walking and running animation depending on its movement speed. Luckily for us, the package we imported comes with several premade animations, so we don't need to start from scratch. Instead, we'll focus on how to apply these animations to the chick, in two different ways. First, we will create separate states to represent each animation, switching between a walking and running animation based on the chick's movement speed. Then, we will look at a method of seamlessly transitioning between these two animations using a Blend Tree.
Creating animation states
Unity's animation system (also known as Mecanim) has two main panels to help us to develop animations, that is, the Animator and Animation panel. In this section, we'll look at the...