Search Unity

Can I combine imported Blender animations for different limbs into a single animation

Discussion in 'Asset Importing & Exporting' started by danield, Sep 29, 2016.

  1. danield

    danield

    Joined:
    Sep 30, 2014
    Posts:
    40
    I would like to combine Arm Swing and Legs Run into a running animation. The reason I would prefer to do this is because I intend for the character to be able to equip different weapons. Since the arms would move differently with a sword, and the legs would move the same regardless, it would simplify things to separate running into two animations.

    I've provided a .blend, .fbx, and screenshot of the export options I used. If it is possible, I'm not sure how to do this with an Animator Controller, so I could use some help on the Unity side of things as well.
     

    Attached Files:

  2. IvanDrake

    IvanDrake

    Joined:
    May 27, 2016
    Posts:
    2
    If you haven't already, look up animation masks in Unity. You can isolate different body parts for specific animations.
     
  3. Cygon4

    Cygon4

    Joined:
    Sep 17, 2012
    Posts:
    382
    ^^ What he says.

    Just create two animations: one where your character runs (including typical arm movements) and another one where your character swings a sword.

    In Unity, create a new layer in your Mecanim state machine and use a bone mask that limits it to the upper body.

    When your character is supposed to strike, play the upper body animation on the extra layer. You can have it smoothly fade in/out and mix with the "running legs" animation, and it'll work the same when standing, running, jumping and so on.
     
  4. uzuleeeee

    uzuleeeee

    Joined:
    May 10, 2017
    Posts:
    4
    what if its a generic rig?