How to move more then 1 object on spline

I need yout help. I created a simple Animation on Spline but i need multiple Objects for an conveyor belt.

Only one cube is moving:

Blueprint:

Any idea how to make this with a lot of objects? I can’t find any tutorial for this.

Thanks for your help.

Hey DarkMicrowave! Welcome back!

So here the problem is your event.
You should have an event (Say an input action event, “Event SpaceBar” or something) Spawn a BP of an actor, then use a dispatcher to run an event with all of this code on the actor object. The dispatch message should include the spline as an input so you can carry over the reference with an output :slight_smile:

Here are some links if you need a refresher or you don’t know how dispatchers work:

Wow thank… But how i can get this offset in SpawnActor? And i need to add both on begin Play?

Any variable flagged as:

image

Will show up on the spawn node; you may need to right click and refresh the node.

And i need to add both on begin Play?

Not necessarily. It really depends on how the conveyor is supposed to work.

If the player comes over and drops an actor on the conveyor, there’s no need to spawn a new one, you’d add an existing actor to an array and calculate a new offset. The offset does not even need to be in the actor.


Depending on the desired complexity, you could create an X number of invisible dummy anchor points moving along the spline. When the player drops an item, we’d attach it to that dummy.

Or use actual spline mesh components that can deform. Dropping something onto a spline mesh, snaps the actor to it. This way, the actor does not care about any offset, it rides attached to a dummy that follows a spline anyway.

That sounds really good. My plan was to create a track treadmill using the code. The player drops the pallet on it and the physics do the rest. It becomes a logistic simulation.

Is that a good idea or is the physics too unreliable?

I’m not a pro in UE yet. I’m still learning.

The conveyor belts are then supposed to start or stop using various triggers.

Honestly, hard to tell. Is this closer to what you’re after:

The attached project is still up, but it’s probably a much version of UE4. You could try to convert it, it may just work…


And we can also try poking @Tuerer, and aks nicely how this works:

1 Like

Thanks that helped me a lot. Now the assembly line works. What I’m still missing is the rotation. They don’t turn in the curve. Tried to insert the Rotation Along Spline.

Blueprint: Assambly Line posted by anonymous | blueprintUE | PasteBin For Unreal Engine

Zoom out to see the complete BP