Search Unity

Question Animation track doesn't work properly with The hierarchy 'Animator Parent/Character Model'

Discussion in 'Timeline' started by LezCT, Nov 18, 2020.

  1. LezCT

    LezCT

    Joined:
    Nov 15, 2014
    Posts:
    55
    Sorry for the confusing title, let me explain it a little more:
    My Character's child transform is copying the parent's transform value for some reason.
    upload_2020-11-18_17-46-38.png

    The position the parent animator is using is the playable director's root/world position. My characters aren't parented to the playable director/timeline.

    I set up my characters like this:

    Parent (With all the components like Animator)
    ↳ Character Model (With original character Animator Moved to Parent)
    mesh, bones, animation rigging components, etc.

    As you can see, my character set up is pretty unusual, but it works perfectly in past versions of unity 2018, and of course, working perfectly in-game even on my current 2019 version.
    it only works weird like that position offset after being bound in the timeline.
    I set up characters like this to avoid complete prefab corruption if it happens, and also to be able to swap characters easily.

    The timeline plays the animations in correct positions if I just use the character model as the bound object on the animation track.

    The project was upgraded from 2018 LTS where it was still working properly to 2019.4.14f

    Hopefully, someone can explain to me what happens and what I can do to solve it without using the actual character model as the animator parent.

    Thanks!
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Hi, would you be able to report this as a bug using the bug reporter?
     
  3. LezCT

    LezCT

    Joined:
    Nov 15, 2014
    Posts:
    55
    Yes! I was able to reproduce the bug.
    Case 1293710

    This bug occurs when I offset the animation clip's root position.
    I have included other scenarios on the repro that also does a similar bug.
    Like when handling the animator's root motion via script OnAnimatorMove(), The animator parent's position will remain at its default position, but the animator's child will follow the timeline animation clip's offset.
     
  4. LezCT

    LezCT

    Joined:
    Nov 15, 2014
    Posts:
    55
    Oh, I found another way to reproduce this bug but it includes a bit of timeline scripting.
    I was using a transform tween timeline script from https://github.com/UnityTechnologies/ATerribleKingdom
    To place the characters without using the animation clip's root offset, and to place them accurately without them parenting to the playable director.
    but the same bug appears where the character's root transform is at the correct position, but the child is also using the root transform's world position IN its local position.

    So I guess it's not limited to the animation clip's root offset.
     
    Last edited: Nov 19, 2020
  5. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Wow. Thanks for the detailed reporting, it's very much appreciated!
     
    LezCT likes this.
  6. LezCT

    LezCT

    Joined:
    Nov 15, 2014
    Posts:
    55
    No problem! I really love working with the timeline that it became a big part of my workflow, so I really appreciate the effort you guys put in this!

    Hopefully we get a fix on later patches!

    Thank you!