Search Unity

Seamless looping timeline?

Discussion in 'Timeline' started by Exeneva, Dec 22, 2017.

  1. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    304
    I have a timeline that starts with a character at a position and ends with the character at that same position. However, what I noticed is the character automatically slows down near the end of the timeline track until it comes to a complete stop at the end. Then the timeline wraps, and the character starts moving again.

    Is there a way to stop a character from slowing to a stop at the end of a timeline, and instead loop seamlessly?
     
    Last edited: Dec 22, 2017
  2. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    787
    Adjust the curves of the animation.
    The normal interpolation is a spline curve that smoothes out towards the start and end.
    All timeline animations are just normal animations, so rightclick and select "edit in animation window".
    Then - as usual - click "curves" at the bottom and then adjust the curve settings so its doing a linear interpolation.
     
    Exeneva likes this.
  3. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    304
    I'm guessing it's one of the Position curves? I see three of them and I'm unable to get a continuous flow after modifying them.
     
  4. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    787
    A position vector consists of 3 individual values, so you have to modify the curve for each one of them (X,Y,Z).

    Maybe there is a better way to do this, but I'm not aware of one. It would be cool though to get a consistent position movement.
    Maybe someone else knows how to do it
     
    Exeneva likes this.
  5. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    304
    I got it to loop seamlessly :)

    Right click the beginning and end keyframes and choose Both Sides: Linear
    This changes the interpolation to be smooth instead of gradual.