How can I move an object over a set amount of time.

I have an object that I’d like to interpolate from vector A to vector B. But I’d like to be able to dynamically set how long it will take to get to vector b. So for example I could input time 4 seconds, and the object would interpolate from vector A to vector B over 4 seconds. I need to be able to set this dynamically during play. If someone could explain to a semi noob the math for accomplishing that. Or maybe there’s a blueprint node I’m not aware of. I’m currently using a timeline with an ease node and I can’t seem to accomplish what I want with just that.

Use a timeline,

you can set the time inside it and the vector locations and it will feed the movement over time.

To get the node just type " Add Timeline "

To edit the node double click it.

youtube video Explaining Timelines


Hope this helps

Timelines would definitely work. I actually just built something like this. You could also check out the Interp to Movement component, which adds that functionality to any blueprint without any real coding involved.

Timeline way:

The interp to Movement component exposes these settings:

Here’s where you find it:

And of course, you could use both. Meaning: Use a timeline setup like in the first example, to drive the parameters of an Interp to Movement Component. Good luck!

Well, you can use tick event with vinterp to with world delta seconds, and event trigger to enable and save the destination vectors and pass it in the tick.
Like you have custom event with entries vector destination and is_move boolean enabled/disabled, that event set passes to real variables, which gets checked in tick, if boolean is true, it will vinterp from object current loc to saved destination vector variable, and also check if his location is equal to destination, if its true then call that event with disable bool entry to stop.
You can also set the interp speed in vinterp node.

the problem with a timeline in this case is that he wants to modify the duration length via a variable which cant be done with timelines.

Hmmm… Not true. My example does that. In recent versions the folks at ue4 have added a number of nodes used to modify timelines this way. In my picture, I’m setting the play rate of the timeline on begin play using a duration float.

To clarify: When you create a timeline on ue4.18, it adds a component variable which can then be added to the event graph. When you pull from that variable, you get a bunch of useful timeline related goodies.

230289-screen-shot-2018-02-11-at-124335-pm.png

No worries. I actually realized after I posted that the OP is using 4.16 and I can’t recall if these features had been introduced then. It might’ve been 4.17. So I might be a bit wrong too.
On your question. Yes and no. You’re not modifying the length of the curve, but you modify the speed at which that length is played. So effectively it plays over a longer or shorter time but it’s not actually longer per se. There is a node where you can stretch the length of the timeline and it seems to have a setting that stretches the points along with the timeline, but I have never actually succeeded at making it work. The effect of altering the play rate is visibly the same (not as clean maybe), so I just stopped trying that route. But it does exist.

ok ill admit i was a bit wrong there. that node doesnt change the length of the curve though right?