Search Unity

  1. How has 2019.2 and the beta been for you so far? Give us feedback in this thread.
    Dismiss Notice

Timeline and Animations

Discussion in '2018.3 Beta' started by davient, Nov 30, 2018.

  1. davient

    davient

    Joined:
    Dec 9, 2012
    Posts:
    2
    In Unity 2018.3.0b12, 2018.3.0b3 (others untested)

    When triggered in Timeline, Animations that modify a property on a GameObject (e.g., Transform.localposition), will have that property reset by a second Animation that does not modify that property (e.g., Transform.localscale).

    Is this intended behaviour? Perhaps I am misunderstanding how this should work?

    I attach an example project: With a Sphere that moves left 5 units and then scales up *5.

    With the timeline PlayOnAwake disabled: the Animator correctly animates through the steps.


    With the timeline PlayOnAwake enabled: The Timeline Fires each animation independently overriding the offset created by the first animation.
     

    Attached Files:

  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    883
    The behaviour you are seeing is expected. On the second animation, the default position/rotation values are being written.

    Timeline works slightly differently that the animator controller in that regard. If you want to keep the offset, you need a position/rotation key, which will enable clip offsets and that let you match the offsets to the previous clip.
     
  3. davient

    davient

    Joined:
    Dec 9, 2012
    Posts:
    2
    Thanks for your response :)

    I've tried adding Position and/or Rotation Keyframes to the Animation Clip (I'm assuming this is what you mean?) but these don't fix the problem. My assumption is that putting in a position keyframe will fix the position to that spot? (so I don't see how that would help?)

    I've dug further and found that I can get the in game to play correctly by setting the Track Offsets on the Timeline->AnimationTrack to Apply Scene Offsets. However, when playing this in the Timeline in editor mode the animation plays incorrectly as I first described.
    Naturally this will make development within timeline cumbersome, as we will have to play the scene every time we want to check an edit.