Search Unity

  1. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  2. Unity 2017.2 is now released.
    Dismiss Notice
  3. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  6. Unity 2017.3 beta is now available for download.
    Dismiss Notice

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:
    969
    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:
    969
    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:
    969
    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:
    969
    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 -

    [​IMG]

    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.

    [​IMG]
     
    Last edited: Apr 21, 2013
  10. Warrior1424

    Warrior1424

    Joined:
    Sep 30, 2010
    Posts:
    969
    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:
    969
    Still no fix?