- Home /
play animation after transition with mechanim
Hello!
I have a very simple mechanim setup with 2 animations. A melee idle, and a melee strike. When the parameter melee_mode = 1, a transition plays from the idle animation to the strike animation. Since the strike animation is very short, the transition plays through roughly half of it and leaves only the tail end untouched.
I would like to have the animator transition from the idle animation to the start frame of the strike animation, and then play the strike animation once the transition finishes.
Thanks for any help,
HC
Answer by theANMATOR2b · Dec 20, 2016 at 03:48 PM
On the transition check 'has exit time' and set the exit time to 1.
See this answer for additional assistance (2D but still the same issue you are having)
http://answers.unity3d.com/questions/1085355/exit-mecanim-state-after-exit-time-or-with-interru.html
Hi, thanks for the response!
Unfortunately, that only preserves the idle animation, and what I'm trying to do is transition before the strike animation plays, making the strike animation unaffected by the transition.
"Transitions define not only how long the blend between states should take, but also under what conditions they should activate. You can set up a transition to occur only when certain conditions are true. To set up these conditions, specify values of parameters in the Animator Controller."
https://docs.unity3d.com/$$anonymous$$anual/class-Transition.html
Your answer
![](https://koobas.hobune.stream/wayback/20220612103046im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Editing Animation Clips 1 Answer
How can I change a mecanim animation by pressing a key? 1 Answer
Mecanim blend-tree transitions problem 0 Answers