Need some guidance: Multiple objects moving over a spline

Protoype:
Objects fly in to the screen from left or right and you can shoot them. The spawning should be random.

What should it do?
Spawn different objects over different paths. The spawned objects need to move over the path from Start to End point of the Path.

There are 10 different paths already excisting in the scene. A path can have multiple objects moving on it as long as the objects are not overlapping with eachother.

What I have tried so far?
I am using a Timeline node to lerp an object from Start to End point of a path. However if I spawn another object on the path the Timeline will start to play again from start and the object that was already moving on the path will also be reset to the start point of the path.

I would like to have the functionality in the SpawnManager to keep everything in one place.

What I want to achieve is have like 20 objects all moving a long a random path starting at the Start point of the path and ending at the End point.

These are the objects I would like to spawn.
ObjectsToSpawn

This is the overview of my current scene.

This is the current BP I made.

This is what it looks like when I run the scene.
ObjectsAlongPath

I hope someone can guide me in the right direction to get this working.

The timeline needs to be in the object you’re spawning :wink:

1 Like

thanks. So a quick update.

This is what I have now but the sphere is not moving unfortunately.
The sphere gets spawned but it does not move.

This is the BP_Sphere

This is the Spawn Manager

Yeah, sorry, the movement code also needs to be in the actor

All the update code needs to be local to the actor.

All the spawner does, is say ‘hey - here’s a spline, follow it’ :slight_smile:

thank you got it working now.
For anyone who has the same question this is my setup:

1 Like