Search Unity

What does the red arrow represent in the animation preview window for Generic animations?

Discussion in 'Animation' started by RobO_HB, Sep 10, 2020.

  1. RobO_HB

    RobO_HB

    Joined:
    Sep 16, 2013
    Posts:
    17
    Hello,

    I'm currently doing some investigation of moving from humanoid to generic animations (to be able to take advantage of more in-line bones for skinning purposes), and I'm running into some problems getting a generic animation (with root motion baked onto either a root node or a leaf trajectory node, and with Root Transform rotation set to Root Node Rotation) to play the same way that a humanoid plays when rotation is set to Body Orientation.

    To avoid this question becoming sprawling and unfocused, at the moment I'm looking for as definitive an answer as I can for this question: What does the red arrow represent in the animation preview window?

    PreviewWindow.png

    The blue arrow and the grey circle, as far as I can tell, represents the rotation and position (respectively) of whatever node is set as the root node in the animation settings. The red arrow is the one I'm confused about.

    When using a humanoid animation with Root Transform Rotation set to Body Orientation, that red arrow follows the orientation of the body, presumably using whatever internal calculation Mecanim uses for that - some interpolation between the hips and the spine bone, maybe?

    But when I set an animation to generic, regardless of what the Root Node settings are and what data is baked onto said root node, it seems like that red arrow never rotates - it always points down the positive Z. It also seems that this is the direction that the model's root points in when this is applied in-game - which causes problems when trying to transition from one animation to another if the first animation had rotated the character away from that particular "forward" direction.

    Doing some searching online, in the forums, in the official documentation, etc., I've yet to find any definitive answer for what that red arrow represents. I've found people speculating that it means the "pose orientation" or something like that, but that's not an interpretation that has any meaning to me. Does anyone know exactly what value it's representing, how that value is used (especially when it comes to aligning the next animation that we might transition to), and whether it matters in a generic animation as far as getting animations to align properly?

    Or is that red arrow a total red herring when it comes to the model's root rotation aligning properly through transitions between different generic animations?
     
    DAcKey and fourthrones20 like this.
  2. JohnTomorrow

    JohnTomorrow

    Joined:
    Apr 19, 2013
    Posts:
    135
    @RobO_HB did you ever figure this out? I am running into the same problem when converting from humanoid to generic animations. It is causing animations to not rotate correctly in playmode.
     
  3. JackPotato

    JackPotato

    Joined:
    Jul 16, 2018
    Posts:
    7
    Did you ever figure this out? Think this is causing my layered masked animations to not animate correctly...
     
  4. RobO_HB

    RobO_HB

    Joined:
    Sep 16, 2013
    Posts:
    17
    No, sorry. The effort to convert to generic was abandoned for the time being, so I stopped digging.

    Apologies that I can't be of more help! If the effort ever gets resumed and I dig around enough to find an answer I'll try to update this thread.
     
    DAcKey and JackPotato like this.
  5. Vasileios_P

    Vasileios_P

    Joined:
    Dec 30, 2019
    Posts:
    9
    in "Animator" do you have "Apply Root Motion" set to true?
    temp.PNG