Beginner - Moving an actor using timeline produces unexpected results

Hi there,

I’m quite new to using Blueprints so I’m hoping someone might be able to help me work out what I’m doing wrong here.

I have a custom event in my actor’s event graph which takes an integer input, multiplies it by 100 (to convert to mm) and adds it to the actor’s location to move it forward.
This setup works correctly but teleports the actor, as there is no interpolation:

In order to get that smooth motion, I added a timeline node with a linear float graph and plugged it into a vector lerp. However, this now seems to move the actor forward by about 30x the expected distance:

Setting the alpha to a fixed value of 1 seems to move the actor forward by the expected distance so I’m a little confused about why this is happening.

Many thanks in advance for any assistance on this one, it’s been keeping me up at night.

Cheers,
Tom

You are constantly changing the start of the lerp which is bad if you want it to go from point a to b in the set time.

You need to set the start location before the timeline and save it to a variable. Then plug that variable as the start of the lerp.

1 Like

Hey CresseyLazuli!

I went ahead and worked it out for you here!

The problem was that you had overlapping distances being moved, so the actor was taking in a new start and end variable and remultiplying the distance by its new location. The solution was to snapshot the beginning and end locations by promoting them to variables before the timeline to keep them from being altered while it is already lerping.

Let us know if this solves your issue! If you still have a problem with it please let us know here.

Perfect, that’s working correctly now. Thank you so much for your help! :slightly_smiling_face: