Reverse the Timeline animation

Hi,
I'm new to unity timeline ,i just wanna play the timeline animation in reverse. I have a simple character forward walking animation i want the animation to play in reverse,when in press backward key.

That isn't built-in to timeline or the playable director, mainly because not all tracks can support it - like audio.

You can acoomplish it via script by setting the playableDirector playmode to Manual, setting the time (time -= Time.deltaTime, for example) and calling DeferredEvaluate(), but in this mode Markers and Audio won't play.

1 Like

It would be very handy if just the AnimationPlayableAsset (the clip) is reversible by a boolean check box on the clip! My main use is for those UI and transition animations where I want to have it close the same way it open but in reversed direction (and probably a bit faster/slower, and time stretching is already possible with this type of clip asset). This way when I update the open animation, the close animation could be updated together. I think this wouldn't be so destructive to the whole time continuity guarantee of the playable system like if we make everything reversible.

2 Likes

[quote=“5argon”, post:3, topic: 742170]
It would be very handy if just the AnimationPlayableAsset (the clip) is reversible by a boolean check box on the clip! My main use is for those UI and transition animations where I want to have it close the same way it open but in reversed direction (and probably a bit faster/slower, and time stretching is already possible with this type of clip asset). This way when I update the open animation, the close animation could be updated together. I think this wouldn’t be so destructive to the whole time continuity guarantee of the playable system like if we make everything reversible.
[/quote]

Agreed, good suggestion @5argon , and not the first time this has been asked. I believe it is on our feature backlog. Animation Clip playback has been optimized to play forward, and so playing a clip backwards by reversing time flow is not an efficient way to play the clip. This is what happens with PingPong extrapolation currently. But having a clip that is known to play backwards would allow optimal playback as well.

2 Likes

Hello @seant_unity , any news on this?

1 Like

No, unfortunately nothing has changed on this. The best way to currently do this is to reverse the animation clip itself -- discussed here , with a sample script to convert the animation clip itself.

Again, this a feature built right into Godot.

[quote=“seant_unity”, post:6, topic: 742170]
No, unfortunately nothing has changed on this. The best way to currently do this is to reverse the animation clip itself – discussed here , with a sample script to convert the animation clip itself.
[/quote]

The link points to an excellent script but unfortunately it uses an obsolete function. What would be the way around using AnimationClipCurveData?

yeah... no, the best way to do this is in the animator of a actual 3d program like blender or 3ds max. the process involves dragging and clicking on the desired keys as well as copy n paste. Yes it will make your file larger. Yes it is worth tradeoff for speed at runtime... even on mobile. How can so many coders not understand what a gui is

[quote=“seant_unity”, post:4, topic: 742170]
Agreed, good suggestion @5argon , and not the first time this has been asked. I believe it is on our feature backlog.
[/quote]
And 2 years later?

1 Like

Same as 5argon . Need that so much for UI animations :(

1 Like

Ha, was searching on this today, and ended up here finding out it's not supported..

Would love to see this supported! But can work around it :(

Suprised this isn't supported. It'd be very useful for UI animations (such as when a UI appears / disappears)

I was trying to find a solution to this to no avail as well. A hack that seemed to work for me was to turn the animations into clip tracks, ping-pong them, drag their clip playhead to where they would normally end, then select fixed length duration for the timeline and end it where the new tracks are now set to begin. Because they are set to ping-pong, they should now all play back to front to begin with and then end before they start playing forward again. Make sure there are keyframes at the start and end for each track when doing this. Hope it helps!

1 Like

I think that it isn't built-in to timeline or the playable director, mainly because not all tracks can support it - like audio.

But why can't it be an option on clips that can support it? This, and cut-paste keys is really needed.

I'm doing it with manual time line update and DeferredEvaluate - and no performance issues in all my use cases [yes. neglectible...]

Ping on this. Would be very useful