Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Bug Additive Animations & root transform positions

Discussion in 'Animation' started by Tomer-Barkan, Jul 9, 2020.

  1. Tomer-Barkan

    Tomer-Barkan

    Joined:
    Jul 31, 2012
    Posts:
    150
    I seem to have encountered a bug, unless I'm missing something.

    I have an "Idle" state in which the root transform is at height 0.3. Then I transition into "Walking" state, in which the root transform starts at height 0.6. I expect the root transform to move from 0.3 to 0.6 during the state transition, and then continue animating the "Walking" animation at height 0.6.

    What actually happens, is that if I set the animation layer to "Additive" so I can have a separate layer to control walking and another one to control attack animations - in the transition from "Idle" to "Walking", the height of the root transform doesn't change despite the starting pose of the "Walking" being higher than the idle. If I set the layer to "Override" it works fine.

    Am I missing some checkbox or something, or is this a bug that I should report?

    Thanks
     
  2. Tomer-Barkan

    Tomer-Barkan

    Joined:
    Jul 31, 2012
    Posts:
    150
    Update: Ok, I somehow figured out that Additive animations do not change the pose to that of the first frame when starting the animation, but instead only animate the changes within the clip itself. This is not explained at all in the Unity documentation (https://docs.unity3d.com/Manual/AnimationLayers.html) but luckily some people I asked knew about it.

    So question is, how can we do additive sequenced animations? For example, if I want to have a walking animation that is the base layer, and then I want to play a 3-stage shooting animation on top of that - raise hand -> shoot -> lower hand. Every animation resets to the base pose when it starts, so the shoot animation plays with the hand down despite it being played right after the raise hand animation.

    Any ideas how this can be done? How can I have an animation sequence play as additive on top of a base walking layer?

    Note: Masks are not an option because both animations control many bones, not just legs or just hands.