I’m encountering a weird bug going on in my project where when I use a Timeline with the Loop tick enabled, the timeline will run the logic 2-3 times in a single frame right at the moment the timeline resets.
More exactly, I have a one second long timeline with the Loop tick enabled. Connected to this timeline is logic that moves an object in my scene with an Interp for smooth movement. At the end of every loop, at exactly 1s, my object will jump forward, making my smooth movement not so smooth. I’ve tested this with a print string with a duration of World Delta Seconds, only to find that at that exact reset point, the log prints three times rather than once per frame.
I’ve currently done a workaround with Do Once node and a timer delay set at a delay of world delta seconds such that the logic only runs once per frame.
A very similar thing happens to me too. I have a basic clock function that takes a timeline of 1 second on loop, and every time it hits a second I add 1 to my variable “seconds”. This works great, it does in fact work as intended; however down the line I added a print node that “prints” that same variable, and while it doesn’t add to it three times, it prints it out 3 times.
No big deal, right? Well later on when I try to change a variable based on how many seconds have passed, it now changes that variable 3 times instead of only once. I’ve tried a “Do Once” node, but it still does it 3 times which is driving me insane.
Update: I’ve just noticed that it only starts printing 3 times after the first loop. The first loop prints once, and then after that it print’s 3 times.
I think I’ve found our culprit, but I’m not sure how to fix it.
The loop is called at the beginning, during, and at the end of the timeline.
I decided to print the Alpha of the Timeline and it prints “0.0, .56, 1.0” (the .56 is just a random number in between, on play this will lerp from 0 to 1). It prints that over and over.