Coin Throw Animation from any State

Coin Distraction Part 3

Tristan Engel
Sep 28, 2021
Player throw animation

In this article we will add an animation for our coin throw.

Animator for Player

We added the Throw animation to the animation controller. Also we created 3 transitions.
Under parameters the CoinThrow Trigger is created.

The transition from Any State to the Throw animation.

Set Trigger in Code

We only need only line. When we r-click and our coin is being instantiated we add:

_animator.SetTrigger("CoinThrow");

--

--

Tristan Engel

Aspiring developer that’s self-learning Unity & C# to transition to a career with Unity. I got a passion for creating interactive experiences.