Way to play two animations at once?

I was wondering if there is a way to play two animation at once. One animation on the upperbody and one animation on the lowerbody. Something like “Fire” on the upper body and “walk” on the lower body. So the legs still walk while the gun is shooting.

Thanks for any insight on this.

You can add a mixing transform bone to the animation through script, which will make the animation only effect that bone's transform and all children of that bone.

(So for example, for an upper body shooting animation, you would add the upper torso bone that has all the other upper body bones as children of it, usually spine1 or spine2 or whatever). Like:

var torsoBone : Transform; //drag the bone here in the inspector</p>

function Start(){
    animation["shoot"].AddMixingTransform(torsoBone);
}

I actually asked the same question a while back, so all of the information I’m posting here is from that question (How do I run two animations at once on the same game object? - Questions & Answers - Unity Discussions)

You’re going to want to use Animation.Blend. Here’s an example of blending:
animation.Play(“walk”); animation[“wave”].layer=1; animation.Play(“wave”); animation[“wave”].weight=0.4f;

I just wanted to add again, all credit goes here.

Hi guys.
Here a very step by step tutorial that explain how to play two animations at once:

You have to use layers: Unity - Manual: Animation Layers

Yes, why not?