Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Humanoid Avatar Mask not working

Discussion in 'Animation' started by JanDawid, Feb 27, 2021.

  1. JanDawid

    JanDawid

    Joined:
    Jul 7, 2014
    Posts:
    283
    So I have an FBX imported as a humanoid with all of the correct joints assigned.
    I made an Avatar Mask for only the upperbody to use (selected the upper body parts of the segmented humanoid image).
    I assign this Avatar Mask to an Animator layer that overrides the default layer. The layer with the mask has the weight set to 1 and is set to Override.
    The animation on this layer is holding an object above their head, and the default layer has your general locomotion animations. The animations all come from this same FBX file which is imported as a humanoid.
    With this mask applied, I'm expecting the result where the locomotion animation should be seen for the legs as the character moves around and the upperbody having the arms raised above the head.
    However what I'm seeing is the entire object-holding animation which is overriding the legs so the legs stay straight (like standing the entire time).

    I'm using Unity 2020.2.2f1 and honestly feel like this is a bug. This really should be working at this point but it's just plain not. Is there anything that I could've possibly missed?
    I have also tried to add this mask to the animation itself in the import settings of the FBX but it doesn't make a difference.
     
  2. JanDawid

    JanDawid

    Joined:
    Jul 7, 2014
    Posts:
    283
    Any ideas on this? If this is intentional then Unity needs to make it clear. But then why be able to create an avatar mask in which you can select specific humanoid body parts?
     
  3. Tiernan98

    Tiernan98

    Joined:
    Jul 11, 2017
    Posts:
    42
    This is not the result I would expect from doing this. If you've done everything as you say, you should see only the top overridden.

    If you have done the correct procedure then it is a bug. However, it may be something small you missed. Do you have any other code that interacts with the Animator that would change these settings or render them useless? Is the upper body layer placed below the main layer?
     
  4. JanDawid

    JanDawid

    Joined:
    Jul 7, 2014
    Posts:
    283
    Ok, so it was a case of me trying to figure this out for a week, then being told to just "check again" to see if I missed anything and, yup, it's my fault.
    I didn't release that another animation was playing on a layer in between the base layer and upper-body layer that wasn't being exited. So that animation was overriding the legs and that basically explains it all.
    Glad it's all cleared up at least. Thanks for the help!