Search Unity

Mecanim - animation layer/mask not overriding completely

Discussion in 'Animation' started by lordofduct, Aug 5, 2014.

  1. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,532
    I have my Base layer on which I have my 'locomotion' animations. These are all the animations that deal with walking/running.

    I also have a 'SwordAttack' layer, this layer has a mask attached to it for only the upper body. This is the animations for the player swinging their sword.

    The animations on this layer are only in effect while the player is swinging the sword. Otherwise, the animation goes into its dormant animation which is on the Base layer with locomotion.

    The 'SwordAttack' layer is set to a Weight of 1, and it's blending is set to 'Override'.

    Thing is, we noticed that animations of the prop bone that the sword is attached to from the Base layer are still occurring along with the animations of the swing. As if they're blended additively.

    For example. We changed the sword idle so that it's the player resting it on the ground behind them, and the animation tilts the sword up as of the player is tapping it on the ground.

    Now if I swing the sword out forward, the 'tap' still occurs, and the sword jerks perpendicular to the swing animation, at the same succession as it would if in idle.

    Is there something else I should be doing to make sure that the 'SwordAttack' layer fully overrides all animations for which its mask is defined?
     
  2. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,532
    So, magic fix.

    My buddy tried figuring out the problem, kept at it, and kept changing the animation in 3dsmax. No luck. Then around 7am noticed that the animation now had a "Fix Me" button in the animation preview area. Clicked it... and it fixed.

    Not sure what caused it, would love to know what... but it works now.