Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Avatar mask doesn't apply transforms

Discussion in 'Animation' started by pvbgs, Jan 2, 2023.

  1. pvbgs

    pvbgs

    Joined:
    Jan 2, 2023
    Posts:
    2
    Hello, I have issue with adding transforms to the animations I made.

    I got skeleton with weapon bones parented to the wrists and I need to be able to rotate and move them around using animations. I created the humanoid rig and avatar mask, making sure I select every single bone, then set up the animation files so their avatar definition is set to "copy from other mask" and picked the correct avatar. The animations use identical model, hierarchy and skeleton as the rig I based my avatar on.

    However when I preview the animation clip in the animation window, the transform/rotation properties and keyframes for the weapon bones are nowhere to be seen:

    https://gyazo.com/9fb5a2babceec797b01ac5c4fcc6bb62
    and the animation of these bones gets completly ignored.

    There's warning message in the import settings saying "Source Mask has a path that does not match the transform hierarchy. Animation may not import correctly" but it pops up on all animations in the project, even the ones that have no issues with applying transforms so it doesn't tell me anything. There are no other warnings showing up.

    I tried using "create from this model" option but it had no effect at all, the properties still were missing.

    Another thing I tried doing was copying transformMask, maskType and maskSource from the older .meta files with working properties (same rig, same mask) to new animations but it didn't work at all.

    Am I missing something? Is this a bug?
     
  2. pvbgs

    pvbgs

    Joined:
    Jan 2, 2023
    Posts:
    2
    I managed to solve the issue, turns out the problem was actually with the way I exported animations from Maya. The keyframes weren't baked on the weapon bones and if that's the case then the parameters won't show up in Unity no matter what. They need to be keyed on at least one frame.