Search Unity

My timeline can't change my character's transform?

Discussion in 'Timeline' started by Txzi, Mar 19, 2018.

  1. Txzi

    Txzi

    Joined:
    Mar 19, 2018
    Posts:
    2
    I made a scene to guide gamer know how to play this game.so I used the timeline .
    But I found that when the timeline is over,my characters returned to their begin transform:(

    ho can i solve it?
    or some else way to solve it?
    use script to record their transform?????
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    This isn't the expected behaviour. Timeline normally leaves characters at the end pose/position they were in when the timeline stopped (either by the user, or finished).

    If they have an animator controller on their animator, control is returned to the state machine. Could that be a possibility?
     
  3. Txzi

    Txzi

    Joined:
    Mar 19, 2018
    Posts:
    2
    I don‘’t know,can i record the end position in the scripts??
     
  4. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    I see no reason why you couldn't.
     
  5. FabDynamic

    FabDynamic

    Joined:
    Jul 31, 2017
    Posts:
    36
    Could you send us a video showing us all the settings and options? (Screencast-o-matic or jing)
     
  6. whiteleon

    whiteleon

    Joined:
    Dec 25, 2017
    Posts:
    4
    I met the same issue. I tried to manually update the position by script when the timeline is over. But I then run into another problem that my character with animator cannot move(although the animator worked fine). it was locked at the end position when the timeline is over. The character can perform walk animation but there is no delta position.
     
  7. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Is the wrap mode on your playableDirector set to Hold? It sounds like timeline is somehow still attached to the animator.
     
  8. whiteleon

    whiteleon

    Joined:
    Dec 25, 2017
    Posts:
    4
    The wrap mode is once. I find out that there is a weird solution at other thread. I set the animator controller as null before the timeline start and reset the animator controller to the character animator when timeline is over. But there will be an obvious jitter at the character when the animator controller is reset to character(it switch to T pose for a frame and switch to normal)
     
    Last edited: Mar 27, 2018
  9. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    By 'once' do you mean Hold or None? Hold will cause timeline to keep evaluating the last frame, where as none will release the timeline when complete.

    As for the weird solution, the existence of an animator controller will cause an object to start relative to it's current position. Otherwise it starts in absolute position. Also, if timeline always uses root motion which sounds like it may be relevant here.
     
  10. whiteleon

    whiteleon

    Joined:
    Dec 25, 2017
    Posts:
    4
    Sorry for not clear enough. The wrap mode is "None" for sure. I finally found that the jitter is caused by the camera transition moved by cinemachine. When the timeline is over, it will automatically set camera to the virtual camera of the cinemachine track at first frame.
    I use "playableDirector.state != PlayState.Playing" to detect if the timeline is over and disable the timeline gameObject.
    I could not find the way to precisely stop the timeline at the end frame and prevent it to set everything on the track back to the first frame.

    Thank you for your prompt reply.
     
  11. RichM

    RichM

    Joined:
    Dec 15, 2014
    Posts:
    3
    Hi Sean. Is this still the Default? With the Clip Transform offsets set to 0,0,0, extrapolation set to none etc., my playable character will always move to the global position of the clip (0,0,0 - or any other position I set) rather than use the last position of the character to start the animation from (it does however leave the character in the position the timeline ends on).

    I have tried toggling and changing all the settings on the Offset fields, the character (being playable) has an animator controller. Is there a way to make sure the timeline picks up from the last location of the character when the timeline was started? Really not sure where else to look.
     
    Last edited: May 4, 2021