How to lerp between 2 locations(vector) by delta time to make the character animation move between these locations?

Thanks for the reply,could you please make it explicit for me?Make a BP?Thanks very much.

Have you tried Timelines ? You can use the timeline and use its output to call SetActorLocation.

OR

Simply use ‘Interp Vector’ node although its less flexible.

Sorry, I am not near my PC right now.

But I will try to explain.

If you are going with Interp method,

In your Event graph, add an event node(Tick will do). Then create two Vectors (those define the two locations between whcih you need to move your charcter).
Draw out from the output of the fisrt Vector and start typing ‘Interp’ Clcik on the Interp Vector node. Connect the other vector into it and set an alpha (adjust it to set how fast the object moves). Connect the delta input to Tick’s Delata second output. Take the output of the Interp node and connect it to SetActorLocation node.

This will move the Actor from one point to other. To alternate between the two, you could add some more logic and switch the two vectors when your Actor has reached its destination.

Using timelines is lot more flexible. Also you can repeat the process on an on… Its rather simple, just experiment with it.

Thanks for typing so much words.Since i’m a noob,i don’t quite know how to achieve this via timeline.Could you please explain it to me thanks very much!

Maybe i find a useful link

Using timeline gives a very smooth transition of location from one position to other. Added a screenshot that I found online and working good for me.

1 Like