Search Issue Tracker

Won't Fix

Votes

0

Found in [Package]

1.1.0, 1.2.2

Issue ID

1186016

Regression

Yes

Timeline animation stops before the last keyframe when it is an even number

Package: Timeline

-

Repro steps:
1. Open user attached "Timeline Bug" project and scene "SampleScene"
2. Press play

Expected result: Cube moves and then disappears on the last keyframe
Actual result: Cube moves and stays visible, the last keyframe is not played

Reproducible with: 2019.2.4f1, 2019.2.8f1, 2019.3.0b6, 2020.1.0a7
Not reproducible with: 2017.4.33f1, 2018.4.10f1, 2019.2.3f1

Reproducible with package versions: 1.1.0 (2019.2.4f1 and above), 1.2.2
Not reproducible with package versions: 1.0.0, 1.1.0 (2019.2.3f1 and earlier)

Note: With some even frames (for example 6, 12, 14, 60) animation plays as expected

Workaround: Setting the last frame of the animation to an odd number (19, 21..)

  1. Resolution Note:

    The change that caused this was a fix the cause was infinite tracks returning a bad length (that contained rounding errors). The expected result here is actually that the last key is NOT evaluated.

    But because it's a step curve, it can be evaluated due to timeline/playables having higher numerical precision for time values than animation clips.

    There are two recommended solutions.
    1) Change the timeline to a Fixed Length duration mode and set the duration of the timeline to the same as the last key. This can be done in the inspector of the timeline asset, which will highlight the length of the timeline being _slightly_ less than the key position.
    2) Use an activation track to indicate the activeness of the gameObject instead of a step curve. The track can be set to automatically disable the object on stop. This is a more robust approach.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.