Search Unity

Animation layers and masks not working correctly

Discussion in 'Animation' started by dkamp, Dec 4, 2021.

  1. dkamp

    dkamp

    Joined:
    Feb 12, 2021
    Posts:
    17
    Hi all

    I'm having an issue trying to achieve something I thought relatively simply. I have 3 animations (for now) walk, idle, shoot. There is no walk AND shoot animation, so I thought to use animation layers (as everything worked nicely when I had 1 layer, except I couldn't play walk and shoot animation simultaneously), So Ive been through many iterations, but essentially I've tried splitting the humanoid in upper and lower body halves and then having 2 new layers on top of base to animate upper and lower halves (as I posted here to no avail https://www.reddit.com/r/Unity3D/comments/r88t3r/unity_animator_using_animation_layers_and_avatar/)

    So I have tried a more minimal example shown in the below 3 video's are my layer setups (2 for simplicity Base and Lower) as well as the weird issues you will see with the over titling of the pelvis, exaggerated gait in the walk etc I have no idea where I'm going wrong and its been a couple of days now.

    1.gif 2.gif 3 (1).gif
     
    persianhonor likes this.
  2. dkamp

    dkamp

    Joined:
    Feb 12, 2021
    Posts:
    17
    I fixed it by simply having 1 body layer, and then an arms layer (with an avatar mask using only the humanoid arms) for shooting, I then set the layer weight programmatically from 0-1 and vice versa when I start and when I stop shooting. Seems to have solved it for now!
     
    persianhonor likes this.