- Home /
Issue with overriding animation layers
I have a my characters state machine working with an Idle, Run, and Jump. What i'd like to do is have a "Throw" animation that is masked to the torso, so when the character is either idle, running, or jumping, their torso will play the same throw animation and then return to normal animation.
I've set up a second animation layer, set it to override, and assigned my torso mask. I created a throw state and transition from anystate under the bool condition Throw. The problem is because i set the layer to override, it overrides all the time. And mechanim requires a default state so its just stuck on my throw animation.
Is there a way to achieve what i'm trying to do? Have an overriding animation that only overrides when I want it to play, and have it transitioning from whatever the base layer is playing?
How do you set the throw bool condition?
_animator.SetBool( "Throw", true );
yield WaitForSeconds(0);
_animator.SetBool( "Throw", false );
Then return to the empty New State on exit time.
Someone says you must set the LayerWeight via code, for example:
pAnimator.SetLayerWeight (1, 1f);
However, I am having the same issue, regardless of the animator the animation when set to override it is not applying the $$anonymous$$ask, that is, the whole body does the animation.
Same issue here. I have a blend tree with walk forward, left, right, etc. Want to override the animation with the char holding a gun. I can override the animation, but my char gets stuck in place. Its plays the animation overrided, but the char dont move. What the hell am I doing wrong?
Answer by twoshoedlou · Nov 22, 2018 at 02:50 AM
@jhooks098 Have you tried adjusting the weight of the second layer when you want the animation to play?
Your answer
Follow this Question
Related Questions
Animation Layer Weight Issue 1 Answer
Scale animation with model 1 Answer
Character legs/knees twisting inside in animation 1 Answer
Gettings Animations in LocalSpace (Parenting Not Working) 0 Answers
Mechanim animation blend tree problem 0 Answers