Mechanim animation doesn't play
Hi guys,
I created 2 animations for my character with the Animation windows - one is Idle, the other is Walk. The idle animation, or should I say, the default animation, plays fine, but the transitioned animation wont play at all. The transition happens, and the state clearly shows the animation running, but the model doesnt change away from Idle. If I set walk as the default, then that plays too, but again, no transitions.
Any ideas?
Without the transitions' setup and the code that triggers the transitions it's pretty hard to help you...
I can see that, but the blue bar shows that the transition is made, but the animation simply doesn't play. I have of course checked that it is the right animation and so on.
To answer your question though, the transition is on a $$anonymous$$ove boolean, and I've checked in the inspector that it is indeed true when the character is supposed to be using that animation. The transition back is when that bool is false.
Answer by Warbeard · Aug 22, 2016 at 11:15 AM
Hey everyone! I figured it out!
My model was set up like this:
Main empty gameobject, which had the scripts. -main body, child of main gameobject -all children objects of main body, like arms and legs and such
The main object had the animator, and it was from that that the animations were created. However, somehow the 'main body' object had the same animator set, and this caused the issue - once I removed that component it plays as it is supposed to!
Thanks for everyone watching, hope this helps someone else out.
Answer by m-dilip · Aug 22, 2016 at 05:00 AM
It would be good if you provide more info on this
I created 2 animation clips by rotating joints in unity (it's a 2d model). In my script I pass the animator a boolean - walking. If walking is false then idle should be playing, if it's true then walking should be playing.
The inspector clearly showed the variable being true, but the transitioned animation didnt play.
Your answer
Follow this Question
Related Questions
Survival shooter - Video 2 - Movement Animation Not Working 1 Answer
How to get quick animation transition variants on start? 0 Answers
Animation Issues 0 Answers
C# - Animation Based on Speed and Direction 1 Answer
Animation Transition Unity 0 Answers