Search Unity

Root motion + move character in timeline

Discussion in 'Timeline' started by akent99, Jul 7, 2021.

  1. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    I am trying to have a single timeline where I would like to use root motion and animation clips to move a character but where I can also set the position of the character multiple times in the timeline (not just once at the start).

    I know I can set the character position and make the timeline relative to that so root motion kicks in from that starting point. But I cannot work out how to change the position of the character in the middle of the timeline. As soon as I record an animation track that sets the position of the character root motion stops moving the character (the recorded track takes control of the character position).

    Example: I am trying to create an animated sequence where a character walks down one street, turns a corner, then walks down another street. However I don't actually want to show the character walking around the corner (I just want the two straight segments). So instead of trying to get all the timing exactly right and animating a 90 degree turn, I would like to
    • Set the position to be "start of street 1"
    • Use root motion to walk down street
    • Set position to be "start of street 2" (with the character also turned by 90 degrees)
    • Use root motion to walk down second street
    Using a Recorder Track I can choose the segments to capture to video clip files (it allows me to chop out boring parts, including going around the corner). I am creating a video file, not an in-game cut scene.

    I can create two timelines and two copies of the character and set the starting point per timeline by setting the character position then using root motion to move from that starting point with scene offsets.

    (The other way is to record start/end positions and not use root motion, taking care that the distance moved matches the correct speed for the animation clip. Using root motion is appealing as I don't have to do these calculations - just set the starting point.)