Search Unity

Animating layers and avatars

Discussion in 'Animation' started by Compressed, Nov 16, 2014.

  1. Compressed

    Compressed

    Joined:
    Sep 20, 2014
    Posts:
    59
    I have the following setup:
    Animator with two layers of animations for a player character.
    The first layer contains full body animations, which move nearly all bones, such as walking.
    The second layer contains things like arm aiming animations (which i do with blending).
    When i imported the character model from blender, i set in the Animations tab (in the clips) that the right hand aiming animation should only use the bones in the right hand (under Mask > Humanoid).
    The problem is, that when i try to run the game, then from the entire right hand animation character correctly only uses his right hand, but rest of his bones remain stationary. Those are the bones which should be controlled by the first animation layer, but they don't move at all. (so i can for example walk and aim at the same time).
    I tried both additive and override but no luck.
    The only way to fix this problem, is to create a Mask with only the right arm set as active and assign it for entire animation layer, this gets it to behave correctly. (so the walking animation correctly plays and only the right hand is controlled by the aiming animation). But i need to have several animations (like right hand aiming, head movement and such) and each of those animations need to have only certain bones enabled (so only right arm bones for aiming, only neck for the head etc..)
    The only solution right now is to create an entire animation layer with it's own Mask for each of those animations and that is pretty ugly solution.
    So how can i solve this problem?

    Thank you.
     
  2. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Yes that how everybody solve this, one layer with a mask per body part that you would like to control.

    You won't have that many layer, we rarely see more than 3-4 'body part layer'