Accuracy and limitations aside, is it more efficient to move an actor over a single plane with a set travel time using event tick, or timeline?
EG: If I want to move an actor from Z=0 to Z=50 would a timeline using vector lerp be more efficient, or an event tick using Get World Delta Time? And how much efficiency would be gained if on a slower platform such as mobile?
I’ve provided a blueprint example of how these actions may be used. The timeline takes 1.25 seconds to complete.
Just as a note, using delta seconds like that is not going to give an accurate result since it changes from frame to frame. If you want it to move a set distance in a set time then do distance(50) / Time(1.25) to get your “Speed” and multiply that speed by Delta Time every tick for that frames update distance. As for more efficient I would think just doing it on tick, or even a timer by function with at least a 0.03 second loop timer so you are getting no less than 30 updates a second would be most efficient. The only real way to know would be testing both methods and using the built in performance tool to see how long each takes. The reason I think timeline would be slower is because of its complexity, it does so much other stuff that the overhead, I would think, would make it a bit slower.
Totally agree, I mean heck, the tick is going to fire one way or the other. By not using the timeline, one doesn’t even have to load the modules for it, nor get it initialized, much less the actual use of it.
i think timeline is more efficient than blueprint tick, because a timeline’s tick is written in C++, and i don’t think it causes the same function call overhead as calling an event every frame, and i think function call overhead is the real performance killer for blueprints.
I’m actually moving something within an actor, and only a small distance – not indefinitely.
I do know that movement components also take in a lot of extra factors that aren’t necessarily needed. That aside, you are talking c++ when I was seeking a blueprint solution; I know I didn’t specify, that was my fault.
I know getting delta once won’t be super accurate but that’s okay. All I’m doing is raising some text to simulate a score change. Being off a small portion of a second won’t change anything.
Can’t really choose a top answer for this post so I’m just going to vote the one with the most responses. Thanks everyone.