1. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice
  2. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  3. We’re giving 2017.1 beta testers a chance to win t-shirts and a Nintendo Switch. Read more on the blog.
    Dismiss Notice
  4. We want to know how you learned Unity! Help us by taking this quick survey and have a chance at a $25 gift card
    Dismiss Notice
  5. Are you an artist or level designer going to Unite Europe? Join our roundtables there to discuss artist features.
    Dismiss Notice
  6. Unity 5.6 is now released.
    Dismiss Notice
  7. Check out all the fixes for 5.6 on the patch releases page.
    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:
    967
    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:
    967
    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:
    967
    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:
    967
    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:
    967
    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:
    967
    Still no fix?