Tutorial 2: *screams in animation components*


The Eleventh Hour

Oh boy, I sure do love leaving things to the last minute! With a matter of hours until this needs to be done, This devlog will (hopefully) be the shortest that I create this semester. With that, it's time to head back into Unity.

Animation Work Things

First, we bring our man into Unity. This process is pretty much identical to importing my barrel from Tutorial 1. The difference here is that there is now things inside the 'Animation' section of the model. Here, we can see details about the animations packages with the model, as well as change details such as looping and animation offset.


Fig. 1

Next, in order to actually play animations, we need an Animation Controller, which allows us to switch between multiple animations when specific conditions are met. For this tutorial, animation Triggers (visible in the left-most panel below) are used to transition between the Idle animation, the created animations, and back.


Fig. 2

To activate the above triggers, I created a new script (below), which waits for a specific keystroke (in this case, Space or E), and then activating the relevant animation trigger, which then  triggers the animation as above.


Fig. 3

Now, we can move on to actually making our Man move (for real this time)! For this, we need two things - First, we need an Animator Component, which allows all of the above to affect our model; and Second, we need a character controller, which will turn our model into a controllable character.


Fig. 4

Lastly, we need a little bit more code in order to make sure the model's walk cycle animates correctly. The majority of this is from the tutorial work, but some minor additions were made to ensure that the walk animation stops as soon as the movement key is lifted.


Fig. 5

And now, it's time for the moment you've (probably not) been waiting for! With all the pieces in place, here is the final version of the model running around and performing animations!


Fig. 6

Immediately Moving On

And with that done, I'd normally be able to take a bit of a break before moving on to the next section. However, spending the last week working at the theatre has put me WILDLY behind, so I'm starting right now. See you in a few hours (I hope)!

Leave a comment

Log in with itch.io to leave a comment.