Tutorial 2 Pt1


Tutorial 2

Set Up 

As I am currently in New Zealand during the time of this dev post I had not yet completed Self Study 2 by the time of this Tutorial so the Mylo Module 2 FBX file is being used. 

The FBX file was moved into the Asset folder of a  empty Unity Project, from there the walking animation was changed to a loop by accessing the characters Animation tab. The object could then be dragged into the scene where an Animator Component was added. To make use of this component a new Animator controller was created and given the name CharCont (Short for character controller). 


From here the Animator window can be accessed which contains the Animation State Machine. The animation assets were then dragged into the Animator window. "Armature | idle" was made to be the default state.

Wave

Transitions connecting to and from the Idle and Wave state were made to initiate the connecting between the animations. For this tutorial it was wanted that if the space bar was pressed the wave animation would be triggered. To accomplish this a Trigger parameter was added to the Parameters tab in the animator, this parameter could then be added to the transition going from idle to wave. Making this parameter function was done by adding the following "Wave" code to the Character object:


This code makes it so if the space bar is pressed the wave animation willbe triggered. The result of this can  be seen in this gif:


Leave a comment

Log in with itch.io to leave a comment.