How can I make a timeline framerate independent?

I have an issue where I’m using curves in a timeline to set the position of an object over a period of time, but I’ve noticed that on higher framerates the timeline is wrapping up much faster. Is there any way to guarantee a timeline will finish at the set time no matter what the framerate is? Any help would be appreciated!

PS - I’ve tried multiplying the timeline’s playrate by the world delta seconds, but that hasn’t fixed the issue.

Timelines uses world delta seconds, unless you set the time to be 0 (so it will work by frame), show us how you setup your current timeline

Filipe is correct. Need some more information to help you.

Here’s how I’m using the timeline. The timeline itself has 3 curves that are are being used as the alpha for lerps to update the position of an object. When I run standalone, the game can reach well over 200 fps, and the timeline appears to be executing much faster than it does when I test it capped at 60 or lower.

When you say set the time for the timeline, how do you go about doing that?

double click the timeline and set it max duration, also, right click in the panel to setup keys, like key 1 at 0 seconds, and key 2 at 1sec, so the timeline will loop in that time range. If you don´t set any time, it will work like a Tick event (by frame)

I already have the time set, but it’s still executing the timeline faster than it should on higher framerates :[

Fixed it! Instead of lerping between the object’s current position and the destination position, I saved the object’s current position into a variable and lerped with that and the destination. Now it runs the same speed no matter the framerate.

Hello, could you show me your set up? I’m currently having the same issue with different length on different FPS.

He most probably did something like this

This function is called in the construction script

Then in Event Graph

256059-drive.png

Your solution seems to be different than the original question you had, seems like your implementation was incorrect rather than the initial problem being to make Timeline framerate independant, in which case it uses delta seconds making it already framerate independant. Now, I imagine the problem was using the Alpha curve where using Lerp would always lead to interpolating between point A and B in the same time no matter what distance, which means as distance is higher then object movement would be too since it needs to achieve the interpolation in the same exact amount of time.

For anyone else wondering, what the OP was saying is that he cached the starting transform of whatever the Timeline is supposed to be lerping, and then used that cached transform as the starting transform in his lerp instead of GetActorTransform() or something similar. Can confirm this will move the object the same distance regardless of framerate, here’s a version I did for a “Wall Raise” ability: