Problem with Timelines and total updates

Hi, i am using a timeline to apply variations of impulse to the character over time. The timeline return a float on each update and i am using this float to apply a impulse to the character over time. The timeline have 1.20 Length.

The problem that i having is that for some reason that i don´t know, in different Play Runs, the timeline do differents updates. For example, some times it do 65 updates and the total impulse applied to the character is 14900. This is the good values. But other times, the timeline do over 100 updates :frowning: other times, 50 updates and obviously, the impulse is different. I think that this is a framerate problem, but i dont really sure.

Anyone can help me with this problem ?. I need a fixed value for total updates. If my Timeline length is 1.20, always fixed, i need, for example, 70 updates ALWAYS. This is possible ? If not, Exist other way to do this ?

PD: Sorry for my english

Best regards

Hi ,

It could possibly be an issue related to framerate. Can you provide me with pictures of what your event graph looks like that has the timeline? Without knowing how it is being called, I can’t think of what it could be. If you’re using Event Tick to call the Timeline, frame rate is definitely going to become an issue, as Tick is called every frame instead of being called at a specific time.

Hi ,

I call this event when the user press a keyboard key, is like a flip-jump to left/right. In the moment of the jump, I play the animation and apply this impulse over time, for the variations that i need, because i can not apply a fixed impulse.

In the attached files you can see the BP, the variables TESTSweepTotalImpulse and TESTSweepTotalUpdates are for my test, please ignore. So, when the user jump, I call the Timeline from PlayfromStart input, then on each update i get the float value returned from timeline, determine the Rigth vector of mi actor to get the direction of the impulse and use this value multiplied by a constant (Sweet Impulse) to obtain my finally value. So on each update I going appling differents impulse to get the desired movement.

Again, i don´t call this from Event Tick, is a simple key event.

Also you can see the timeline curve in the second file attached.

Hope you can help me

Thanks for you time.

PD: The other input used to multiply SweepImpulse is a inter value that can be -1 or 1 depending of the jump direction, don’t worry for this value.

Would it be possible for you to provide me with your project? If the project is too large for answerhub, you’re welcome to upload it to a third party site such as DropBox. Having more context and being able to experiment with the blueprint should make it easier to diagnose the problem.

As a suggestion, try using AddForce instead of AddImpulse, as impulse is something that should be added just once while force is something that should be added over time as you are attempting.

Hi ,

I can not send the entire project, but I will try to prepare a demonstration project

Anyway, i will try the addForce solution, but I pretty sure that this is not the problem. The problem come because the TimeLine do differents total of updates :S . . . I have a integer var that increment on each update of the timeline, and some times when the timeline finish, always this var have randomly values, some times 100, other 70, other 90 . . . very crazy :S . . . y don´t know why this happen, taking in account that i run the timeline when a user press a key and always has the same length (1.20)

Maybe you can do some test like this, prepare a timeline with a curve like mine, do this in a project with a map with some objets and increment a integer var on each update of the timeline. Then, print the value of the variable. Maybe doing this by your own you can see my problem.

Thanks for you time.

Best regards

The ‘update’ part of the Timeline is called every frame, so it will not be consistent if your framerate is fluctuating at all as you originally suggested. I would suggest using a Timer instead. With a timer you could set it to 0.1 seconds or something similar to have it update at a steady rate, although you would have to find a different way to apply the impulse as you wouldn’t be able to use the curve of the timeline.

I hope this helps!

umm this is a very good idea , maybe i can use a Timer and a curve to get the values from this curve and by this way i can apply the impulse independent of the framerate. … sound a very good option, let me some time to try it, i will be in touch soon. Again, thanks so much for your help.

Hi ,

Great solution (A timer with 0.1 delay in loop and a curve to get the impulse values) it work perfect and do not have the update variations !! :).

Thanks so much for your help, really appreciate it.

Best regards