Learn to make cutscenes in unity3d by building a stealth Game.
Objective: Challenge Coin Toss Animation.
We start this by dragging and dropping Daren's throw animation to the animator window, then create a transition from any state to throw animation. Create another two transitions from throw to idle set a condition to idle when is walking is false and disable has exist time and do the same from throw to walk but add a condition to is walking to be true.
Create a trigger parameter called is throwing, and select a transition from any state arrow, and the set is throwing as condition and disable has exist time.
Note: When creating a state machine make sure to open the animator window when selecting the game object which has an animator, for me, I have an issue when any state is not working until I select the Daren model which has an animator and finds the transitions are not there so I create again and everything seems to work.
Go to the player script, and the play animation when the right click is pressed but when we is coin tossed is false inside the physics dot raycast condition.
This is how I solve this challenge.
See you in the next article.