Set Timeline play rate not works well sometimes

I find something wrong about function setplayrate of timeline component. I set a curve with last key 0.1s to timeline, and I write a blueprint func to test this problem. When I try to use "set play rate " to change timelines play rate,I found it works on play rate is 0.1, 1.0 and 2.0, the time interval of timeline start and finshed is correct. But when I try to set play rate to 3.0 and 4.0, the time interval is a same value !? 5.0 and 6.0 is also has problem, does it not works with a linear change? Or there is a difference with timeline play time and the time timeline finshed ? I need change timeline rate to fast ot slow my shuttle smooth move.
Thanks for a answer!





(post deleted by author)

I think you may be having a problem with the code you’re using to control your car.

Timelines and play rates definitely work fine :slight_smile:

But if you start testing it over very small intervals like this, you’ll run into the problem that the timeline can only be updated once per frame.

2 Likes

(post deleted by author)

Thanks for your answer!
I think you are right. I have found the max timeline update rate is depend to editor frame time. When I try to set some large rate to timeline , the timeline will cost a fixed time that is 1.0s / 60fps . So the playrate had caculated to ensure it wont up to max rate in current frame rate. What makes me confused is the max play rate should be about 6 when my editor is 60fps(since curve is 0.1s) , and I have controlled the rate less than 6. Just like image shows, I got the same time interval when I set timeline play rate at 3.0 and 4.0 ! <o.O>
So I want to know why two different play rates make a same time interval, I use timeline to control my car since it can give a linear lerp value to set my car location, but I found when I change play rate linearly, the timeline doesnt work linearly. It causes when car moving in scene, its speed in fact is not same to the speed I have set. For example, I set car speed to 200cm/s, the timeline works 0.1s at 1.0 rate, and I use timeline to move car 5.0cm everytime(cant more than 7.0cm for some reasons),so I need timeline to works 40 times in 1 second, now the timeline works 10 times in 1 second, so I set the play rate to 4.0 at first play , then play timeline from start when the timeline finished. But exactly, it only works same to when the play rate is setted to 3.0, so my car speed is only about 150cm/s in fact. Thats why I think if timeline works linearly until it up to editor frame rate, did my method wrong ? Should I continue to use timeline to move car at this condition ?
Thanks again if you can answer my question and solve my puzzle ! <:)>

Can you show the code for moving the car?

(post deleted by author)

Of course, here it is

Ok, that looks fine, as long as the length of the timeline and the length of ‘new track 0’ are the same.