Timeline Node Question

Hey @ssdasdw!

When you print your float track’s value multiplied by 10, you might see that it ends at 10. But that doesn’t mean that the timeline has updated 10 times and teleported the actor 1 unit further on X axis each time.

There are many ways to smoothly move objects for a certain distance! You can trigger their movement constantly using a timer, timeline, or after a gate connected to Event Tick, and constantly check if they’ve reached the target location¹ or if the movement has been triggered enough²; or use interpolation³.

  1. Due to float precision, it’s near impossible to detect when exactly an object’s location is equal to our target location. So in the checking method where we compare the locations, we’d either round the values, set a tolerance, or move the actor on a spline and detect when it reaches the end point.

This could be a bit of an overkill for your simple task, so let’s move on.

  1. In the other checking method, we’d either use time and the actor’s velocity to calculate the distance it has traveled but that wouldn’t be reliable like those first two options in the first method, those where we don’t use a spline. Instead, we can save the cummulative movement input or the iteration count and stop triggering the movement when it reaches.

Now that we’re done with checking methods, it’s time for the best approach for your specific task!

  1. Remember when I said the timeline doesn’t update the amount of times you expected it to? Well that’s not a problem, because you can interpolate the time passed between your desired values!

These being said, here are the two approaches you can go with:

Below are the updated versions since the previous ones were frame dependent

(You can also set the actor’s world location too but adding local offset is more practical. Got a bit long though in order to make it frame independent so this might not be preffered.)

(And here’s the one I’d recommend more for this task. Like @Everynone said, my mistake here was not saving the actor’s location before triggering the timeline, also the float track’s value was plugged into the wrong pin of the finterp node.)

Hope this helps! :innocent: