I read the manual, watched a couple of tutorials read on the forums but I don’t get how a simple animation is supposed to be triggered.
I have an object which for 99% of the time isn’t animated but for a short moment it needs to shake a little.
I made an Animator Controller
and an Animation
. I dragged the animation into the controller as a state. This is where it gets fuzzy.
There’s an Entry
and Any State
states and the my clip gets automatically linked to Entry
.
I want the clip to run when a trigger is true, NOT automatically at start.
Possible solution:
All I need is Any State
transitioned to my animation. So I thought I should make a dummy state to “lure” Entry
into, so to shake the transition off my animation, since apparently I can’t delete the transition from Entry
to my animation. But I don’t think this is the right way to do, but more of a ghetto workaround.
What’s the right way, I’m asking?
An animator controller can’t have “no state”.
You need an “idle” animation for when it’s not shaking. Have it go from entry to looping idle. When the trigger happens, it can transition to the shake animation, play once, and then go back to idle.
check this thread on how to trigger an animation http://answers.unity3d.com/questions/1386713/animator-and-scripting-problems-help.html?childToView=1388007#answer-1388007