Can't trigger jump attack animation while conditions are checked
Hi there !
Feeling stupid to ask this question, I tried to find an answer into previous posts and many tutorials before posting here.
I have a character that can idle, run, walk, attack when grounded and jump. From now on, setting the animator was going pretty smoothly but I now have a problem to trigger the jump attack animation.
As you can see on the pic below, conditions to trigger that jump attacks are checked, however the animator does not go from jump to jump_attack animation. Transitions and interruptions are still unclear for me, but I tried many settings but did not change anything.
Does anyone can see where's my problem ?
if (Input.GetButtonDown("Attack") && canAttack)
{
isAttacking = true;
if (CharacterController2D.instance.m_Grounded == true)
{
OnAttackButton(); //Grounded attacks
}
else
{
OnJumpAttack(); //On jump attacks
}
}
public void OnJumpAttack()
{
anim.SetTrigger("jumpAttack1");
Debug.Log("Jumping attack");
}
Does the animator stay in a jump state after setting the trigger? Or goes to idle state?
Are there conditions for switching from Player_Jump to IDLE? $$anonymous$$aybe you need to change transitions order when you click on Player_Jump state.
Your answer
Follow this Question
Related Questions
Prevent Animation Tab From Changing the position of an object 0 Answers
Why does my Anima2D rig disappear every time I load my project? 0 Answers
Cinema4d FBX Animations not working 0 Answers
State not importing correctly in the Animation Controller Tab. 1 Answer
Exporting Maya Animation of player with ball to unity ? 0 Answers