Moving a sound with Lerp(Vector) and a Timeline?

Hey people,

I am looking to move a randomly selected sound from an array to a new location in a predetermined area. I would like it the movement to be smooth, so I’ve tried using a timeline and an Lerp(Vector) node. It doesn’t quite seem to work however. Any ideas how to do this correctly?

Here’s the timeline and the Lerp node:

Here’s what the Lerp is connected to:

I have a sneaking suspicion that every time the timeline updates it takes a new random location… But I wouldn’t quite know how to make it work correctly.

Thanks in advance

Hi,

as far as I see your both values for the lerp is the start and end point.

So the result of the lerp should be the world position which you have to set with SetWorldLocation instead of add local offset.

freakxnet

Alright, that seems to have worked for one specific actor (the Toucan_1 actor). If I had an array of sounds from which I randomly picked one, would it still work?

Basically the same setup, but the AddLocalOffset is replaced by the SetWorldLocation and its target is picked from the array in the picture:

Thanks for the help so far!

If you use SetWorldLocation with different actors then each actor would get the same location. You have to set the start and position for each actor before you start the timeline. Otherwise each actor would need an own timeline.

Vector Toucan_1_start, Toucan_1_end

Other way could be to create a voice actor blueprint which has the start and end point as values which can be set.

As far as I understand what you want to achive.

What you could also do is to set a normal vector which describes the movement direction. On each timeline tick you could then get the world position and add this direction to position and set it as new world location. You can define a movement vector for each actor or a single direction for every actor.