- Home /
I found out the solution, all I had to do is a second layer, setting the weight to 1 as additive, adding an empty space and a transition from my Hit animation to the empty space.
How do I override an animation in animator?
Hello, I am using the Invector Third Person Controller Asset from the Store. I wanted to change the script so I can implement some of my own animations, like a "hit" animation whenever I click let's say the "F" button. I added the animation into the Animator and wrote the following method to call the animation
public virtual void Hit()
{
animator.CrossFade("HitAnim", 0.1f);
}
Now my animation plays successfully, the only problem is that my animation cannot be played while Walking or Jumping. How should I write it in order to play the animation even when I am mid-air or walking?
I found some tips online like using Layers but all I get is the following Warning:
calling animator.gotostate on synchronize layer
so it doesn't work.
Follow this Question
Related Questions
why I have to anim.getComponent in update() function when I had done in Start () function 2 Answers
Opening one door in a scene causes all others to open 1 Answer
How to trigger different animations depending on where a gameobject collides? 1 Answer
What is the proper way to wait for an Animator Controller to update? 1 Answer
A better way to trigger animations. 0 Answers