Search Unity

Issue with additive layer

Discussion in 'Animation' started by Trecool182, May 5, 2020.

  1. Trecool182

    Trecool182

    Joined:
    Aug 30, 2018
    Posts:
    10
    My goal is to be able to place my character in a certain stance (lying in bed), and have animation on an additive layer, for example a "head shake" which would work in this stance, as well as any other stance. This setup works ok, but here is the issue i'm running into :

    I change my stance state "LyingBed" (driving all body bones) to another state "LyingBed_LeftHandUp" (which only has keys for the left arm, and has write default set to off), it will cause the headshake additive animation to keep adding to itself and make the head bones behave in unexpected ways.

    Without the head shake additive animation, the stance animations work correctly.


    The "fix" would be to include keys for all body bones in the stance layer, but I do want them to only affect the required bones. For exemple, I'd like to transition to "LeftHandUp" and then "RightHandUp" to have both hands raised. Since i only have transitions to them from the "LyingBed" state, I know the rest of the body is already in the state I want. Of course, if I transition back to LyingBed state, it will "clear" the arms keys and have both hands come down, and fix the head shake issue at the same time.

    Is there a way to have the additive animation not require animation in above layers (either by keyframe, or by write defaults)?

    In the gif below, I show the problem :
    - First I activate some stance overrides, which play well together because they only drive their own bone, and have "write defaults" to off
    - Then I clear them, and I activate the head shake which is in an additive layer
    - No issue in the default stance because all bones are still driven by the stance layer
    - As soon as I transition to a stance override, neck bones stop being driven by the stance layer, and the additive layer seems to keep adding to itself.

    IgxKwiyvP5.gif

    Note that it is a generic rig.
     
    Last edited: May 5, 2020