Search Unity

player position is not the same as timeline

Discussion in 'Timeline' started by bsdzhu, May 10, 2018.

  1. bsdzhu

    bsdzhu

    Joined:
    Jul 27, 2015
    Posts:
    6
    hi all, here is my question:

    my player is controlled by animator, and 'Apply Root Motion' is checked.
    in 'game mode', if i press 'a', player will go forward and touch trigger (the white cube), which leads to timeline playing.

    then i expect:
    player turns left and continues moving

    but the result is: player position is not the same as timeline key frames, i hope that play transfers to the exact position she is keyed in timeline.

    if you can switch to editor mode, drag time slider, what you see is what i expect.

    how can i get expected result in game mode?
    thank you for viewing my post.
     

    Attached Files:

    Last edited: May 10, 2018
  2. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    417
    This is a known bug, fixed in 2018.3.
     
  3. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    If you remove the controller, the timeline should play back the same in editor/playmode. The controller causes the character to start relative, not in absolute position.
     
  4. bsdzhu

    bsdzhu

    Joined:
    Jul 27, 2015
    Posts:
    6
    thank you.
    i went to homepage of unity, and found latest version is 2018.1.
    i will try that out when 2018.3 is available.
     
  5. bsdzhu

    bsdzhu

    Joined:
    Jul 27, 2015
    Posts:
    6
    unfortunately our player has her own complicated state and needs animator controller.
    also in our game, player will enter trigger in arbitrary angle. we want our player blend from trigger-entering point to timeline start point.

    later i will try to dynamically assign a track offset, or blend character with code before timeline playing.

    Thank you.
     
  6. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Unfortunately if the animator has a controller and root motion flag enabled, it's difficult to make the character go to a fixed position/orientation, especially through blending because all motion is applied as deltas.

    Depending on the use case, you may consider temporarily disabling root motion or temporarily removing the controller.

    This is exactly the type of thing we are fixing in 2018.3. The goal is to let timeline dictate how/where the track plays back, yet still work with state machines.
     
    diasrodrigo likes this.
  7. bsdzhu

    bsdzhu

    Joined:
    Jul 27, 2015
    Posts:
    6
    Thank you four your kind explanation.:)