Day 16: Animations for my character
- neelvinay17
- Jul 13, 2023
- 1 min read
Updated: Jul 24, 2023
I started day 16 off by importing a couple of basic animations from mixamo, and learning how to use Blend Trees to consolidate animations. Once I made a blend tree for my idle, walking and running animation, I added some code onto my player movement script to be able to blend and call all three animations at the right time. Something else I also worked on was making my character jump, for which I had to add a ground check to make sure that my character would not jump middair. I also added gravity, to make sure it felt realistic to jump a certain height. Once my jump was done, I decided I would add one more animation: the attack animation. This was very easily done, as I just created another animation layer, created a trigger parameter and set the attack to play when the left mouse button was clicked. I felt a smile appear on my face as my game slowly but surely started to come to life...
_______________________________________________________________________________________________________
What is a Blend Tree?
Blend Trees are a special type of state in an Animation State Machine. The states available will depend on the type of gameplay, but typical states include things like idling, walking, running and jumping.
What is an animation layer?
Animation layers let you create and blend multiple levels of animation in a scene. You can create layers to organize new keyframe animation, or to keyframe on top of existing animation without overwriting the original curves.
What is a trigger parameter?
A boolean parameter that is reset by the controller when consumed by a transition (represented by a circle button).

Image Source: My unity game




Comments