Animator: How to interrupt one animation for another.

I currently have setup a jump and fall blend tree. These animations are played depending on the vertical speed of the character. So, if the character is falling or jumping it switches between the preset jump animations in the blend tree.

However, I would want it so that if I want another animation to be played, for something as attacking while jumping. I am curious as to how I can do that.

My current setup is Any State → “Jump and Fall” blend tree with the condition of being not grounded, which is determined using the built in Physics engine.

Anyone, have any ideas? The current situation is that I tree to use another animation, but it plays the other animation then immediately goes to the blend tree because of the Any State. Is there a way I can have the blend tree paused then continued?

Edit: May be good to mention that all this is 2D.

You could use a body mask to exclude the arms to prevent the arms from being affected by the upwards/downwards movement. maybe you could set the animation from falling/jumping for the arms while falling/jumping but if they attack then you set the arms to attack or even the whole upperbody.

http://docs.unity3d.com/Manual/class-AvatarBodyMask.html

@LarsE, I’m sure you already figured it out but you could try setting has exit time on that animation transition for the attack. Then it will run through it’s full animation. but that means