How it works...

Animation Events call public functions from the scripts assigned to the game object playing the animation. To make it work, the Function field of the Animation Event needs to have the same name as the function we want to call from the script.

Events are extremely useful because they allow us to synchronize function calls with animations. The best moment to check if player hits the target is when we see a visual hit in the animationa fist is in its extreme position in a punch, or a sword is in its extreme position in a swing. Without Animation Events, we would have to always manually delay function calls to achieve similar results.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.186.219