- Home /
Mecanim: Stop/Hold Animation at the end
So, I have a death animation where the character is standing, then falling to the ground.
I trigger this animation through a bool value set up in mecanim.
Now I want to play the death animation only once. After that I dont wan't to blend in another animation. Actually I just want to stop at the last frame of the animation and hold it. Is there any easy way to this?
Regards
Answer by Grim_Darknight · May 27, 2013 at 01:04 AM
Make the death animation so that you cannot transition out of it and make sure it is non looping.
i've been looking for this like 5 hours wow no-one explained how to stop the animation on last frame
Answer by Neogene · Oct 18, 2018 at 09:35 AM
1) Disable loop from import settings of the animation. 2) Generate transition to the death animation 3) Select transition -> settings -> "Can Transition to Self" set to false (unchecked)
Neogene's answer helped for my scenario. I wanted to from AnyState to DeathAnim and on the death animation end hold it.
Answer by Griffo · May 24, 2013 at 09:46 AM
If you want to pause a layer you could set that layer's weight to 0
private var anim : Animator;
anim.SetLayerWeight(1, 0);
Your answer
