Search Unity

Mecanim: Making certain limbs ignore animation

Discussion in 'Editor & General Support' started by Warrior1424, Apr 20, 2013.

  1. Warrior1424

    Warrior1424

    Joined:
    Sep 30, 2010
    Posts:
    984
    I have an animated character using mecanim.
    How would I make his head not be affected by any animation at all?
    I want to take control of it with code without the movement caused by the animations.
     
  2. Vire

    Vire

    Joined:
    Jun 17, 2012
    Posts:
    178
  3. Warrior1424

    Warrior1424

    Joined:
    Sep 30, 2010
    Posts:
    984
    I tried that a few different ways.
    But how exactly could I do it?
    I watched the tutorial and went through the documentation.
     
  4. Vire

    Vire

    Joined:
    Jun 17, 2012
    Posts:
    178
    Only way I've done it is by making a new layer via animator and slapping that on top of it. I don't have much experience beyond that, the "stealth" tutorial in the asset store does it this way.
     
  5. Warrior1424

    Warrior1424

    Joined:
    Sep 30, 2010
    Posts:
    984
    Strange. I tried that but it animates anyways. Would the mask have the head green or red?
     
  6. Vire

    Vire

    Joined:
    Jun 17, 2012
    Posts:
    178
    Red == will not animate
    Green == will animate
     
  7. Warrior1424

    Warrior1424

    Joined:
    Sep 30, 2010
    Posts:
    984
    I understand that.
    When you say "slapping that on top of it", what do you mean by "that"?
    The part I'm trying to figure out is how to override an animation with no animation.
     
  8. Vire

    Vire

    Joined:
    Jun 17, 2012
    Posts:
    178
    "That" is the AvatarMask -



    And it goes there: Mask None (AvatarMask)
     
  9. Vire

    Vire

    Joined:
    Jun 17, 2012
    Posts:
    178
    Ok epic fail on my part. I forgot to mention there's TWO ways of doing it, you can do it using the animator or you can do it on the import settings (of the imported model that contains the animations) -> animation -> body mask directly at the bottom of the settings, hidden away nicely..

    Here's an image that may help.

    Edit: Broken in 4.1.2 - cant apply/revert settings they're greyed out.

     
    Last edited: Apr 21, 2013
  10. Warrior1424

    Warrior1424

    Joined:
    Sep 30, 2010
    Posts:
    984
    So I can't do it until it gets fixed?
    I was wondering why I couldn't apply it in the import settings.
    Thanks for the help.
     
  11. Vire

    Vire

    Joined:
    Jun 17, 2012
    Posts:
    178
    I filed a bug report but no saying if/when it'll be fixed... :/

    Kind of need it too for my attack animations while moving..
     
  12. Warrior1424

    Warrior1424

    Joined:
    Sep 30, 2010
    Posts:
    984
    Still no fix?