Posted July 25, 2023 by eddiecUTAS
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)
door 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