Interrupt to jumping animation at any time

My anim state graph so far looks like this:

My problem is that I don’t know how to set up the interruptions on the state graph, so no matter the animation or transition, it will always play the jump animation.

My link to the project:
https://playcanvas.com/editor/scene/1369648

Thx in advance for any help

Hi @SayHiToMePls! As far as I can see your setup looks good to me. Which conditions have you added to your Jump Up transition?

if(isJumping == true)

Is that the condition on your transition? What is the current result?

Oh, I didn’t think of debugging.

It’s getting late for me, though. I will try it out tomorrow and tell you what is going on

Alright, I have done a little debugging. And I come to the conclusion that the conditions are working as expected. (I.e. when I jump up, jumpingUp is true and when I land, false)

Now, the only problem are the interruptions I have to set up for each state. And this is the part where I need your help.

I’m not sure why you need to use Interruption. Sinds your transition is from Any state I expect it should work as it is. What is the current result?

And this is exactly what does not happen. When I jump, it delays the jump animation for some reason and does not even play the landing animation in the first place.

Could it be you use Exit Time on a transition somewhere? Maybe this could cause the delay, but I’m not sure. If the Land animation is not played correctly you have to check the conditions on the transition between your Land animation and the animations after.

Could you please fork my project and show me where my problem is and how I can solve it?

Ok, nevermind, I found an exit time. I have set it on the transition from any to jumping.

Nevertheless, I sometimes still have delay when I jump while there is a transition between the running animations.

I’m not sure if these transitions are correct, because you already have a transition from Any state. What is the result if you remove the transition from Any state?

Good question!

Give me a minute, I’ll tell you what happens

I’d have the same problem

I think you should double check all transitions to your jump animation. Maybe only use the transition from Any state and remove the other transitions.

I did

Now, there is only the problem that when I have a transition between running animations while jumping, the jump animation would only play after the transition.

Have these transitions an Exit Time?

no

I forked your project and I think I see what you mean. Probably this ‘delay’ is script related.

What exactly am I supposed to fix there?