Playing two animations from one armature

I have a simple armature with two animations. It is simply two cylinders that each have an animation to wave around. I can play each animation separately (alone) but not together.

This is the code I have attached to the armature:

function Start()
{
    animation["LeftArm"].wrapMode = WrapMode.Loop;
    animation["RightArm"].wrapMode = WrapMode.Loop;
}

function Update () {
    animation.CrossFade("LeftArm");
    animation.CrossFade("RightArm");

}

This is because your animations overwrite each other. The leftarm animation has curves for the right arm and vice versa.

The best way to fix it is to go back to your modeling program and remove the animation information for arms that aren't in the animation.

If you're using Blender there's a complication, in that the default FBX exporter doesn't work correctly for this situation.

What you need to do is open your export_fbx.py file (forget where it's located), find the line

if ob_generic == ob_meshes and my_ob.fbxArm:
  # do nothing,
  pass
elif ob_generic == ob_bones:

and alter the last line to be:

elif ob_generic == ob_bones and my_ob.blenName in blenAction.getChannelNames():

Now FBX animations will only export bones that do have animation keys in the animation.

You can fix it in code through setting the clips' blendMode to AnimationBlendMode.Additive, which will "add" their movement to the currently playing animation. You'll need to have another clip that isn't additive playing or they won't work, I think.

Hi, I am the one that made the cylinders and animations for him. I did it in Blender 2.49b What I did was make two parallel cylinders, both in the same mesh. I made a small armature for them, where I made one first and duplicated it across in edit mode, meaning they are both in the same armature. I made one action for the left cylinder to move, one action for the right cylinder to move. Both actions only effect the base bone of their respective armatures, meaning they are completely independent of each other. I have a third action called Base where it just one frame of the cylinders in their default standing position. I can use the NLA Editor in Blender to play both actions at the same time and it works great. We are using this as an experiment so we can get the hands in a first person shooter working. I can't see any reason why what I made is causing the problem. It looks like Vincenti might be on to something. Thanks in advance for any further help.