Tutorial 2


Hello, for this tutorial I followed all the steps to create a waving and walking animation and trigger in Unity. 

In this simple scene,I have used two models, the models provided on MyLO, and the model I created in Blender. In addition, there is a colored planed/floor and a empty game object trigger that will make the door gameobject isActive() to false once triggered. 

Wave (press space bar to activate animation)

wave


door trigger 

walking

the walking animation trigger is set up the same is the wave animation, where I have created a walk parameter trigger


For code to trigger this parameter, I have created a simple velocity check in the update() function to check if the player is moving. If the player is moving, then the Walk parameter is triggered. Alternatively I could have checked if the user is pressing a certain key e.g if (Input.GetKeyDown(KeyCode.W)) { //trigger walking animation}, but this method I have used, may be more useful for me in the future if I want to change/add extra functionality, or apply to a non character object e.g a moving platform


Leave a comment

Log in with itch.io to leave a comment.