# How to move more then 1 object on spline

**URL:** <https://forums.unrealengine.com/t/how-to-move-more-then-1-object-on-spline/673842>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE4, UE4-27, Blueprint, question\
**Created:** [October 20, 2022, 9:45pm UTC](https://forums.unrealengine.com/t/how-to-move-more-then-1-object-on-spline/673842 "2022-10-20T21:45:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![DarkMicrowave](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DarkMicrowave](https://forums.unrealengine.com/u/DarkMicrowave)\
**Post date:** [October 20, 2022, 9:45pm UTC](https://forums.unrealengine.com/t/how-to-move-more-then-1-object-on-spline/673842/1 "2022-10-20T21:45:52Z")

</div>

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:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/5/0/2507ba7ac687e6af99872d5d75640427f38ef458.png)](https://ibb.co/BCYGTP7)

Blueprint:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/2/2/c22200a3a3529e36dd6d4c8a99a0831ebf6a1a28.png)](https://ibb.co/nPRFHSq)

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

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![Mind-Brain](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mind-brain/32/906573_2.png) [@Mind-Brain](https://forums.unrealengine.com/u/Mind-Brain)\
**Post date:** [October 21, 2022, 2:53am UTC](https://forums.unrealengine.com/t/how-to-move-more-then-1-object-on-spline/673842/2 "2022-10-21T02:53:09Z")

</div>

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 🙂

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

> **[Actor Communication](https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/ActorCommunication/)**
>
> Overview of the different methods of Actor Communication.

> **[Event Dispatchers / Delegates Quick Start Guide](https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/ActorCommunication/EventDispatcherQuickStart/)**
>
> Quick Start for the Event Dispatcher / Delegate communication method.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 21, 2022, 8:06am UTC](https://forums.unrealengine.com/t/how-to-move-more-then-1-object-on-spline/673842/3 "2022-10-21T08:06:38Z")

</div>

> [@Move multiple actors along spline](https://forums.unrealengine.com/t/move-multiple-actors-along-spline/437200/7):
>
> Here’s a simplified (compared to yours) script I’d use were I to push numerous actors along a spline: [[Image from Gyazo]](https://gyazo.com/cc07a1a805a8c28391c561dbac6e5380) Essentially, each car stores an offset. We animate another spline offset using a timeline, add both, and reposition the car. An optional Modulo wraps the value so we get perpetual motion.

---

<div class="post-metadata">

**Author:** ![DarkMicrowave](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DarkMicrowave](https://forums.unrealengine.com/u/DarkMicrowave)\
**Post date:** [October 21, 2022, 3:15pm UTC](https://forums.unrealengine.com/t/how-to-move-more-then-1-object-on-spline/673842/4 "2022-10-21T15:15:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 21, 2022, 3:25pm UTC](https://forums.unrealengine.com/t/how-to-move-more-then-1-object-on-spline/673842/5 "2022-10-21T15:25:18Z")

</div>

Any variable flagged as:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/2/8/92808272d5dfa6b2c0588f8ef22984e98cd4c9f0.png)

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.

---

<div class="post-metadata">

**Author:** ![DarkMicrowave](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DarkMicrowave](https://forums.unrealengine.com/u/DarkMicrowave)\
**Post date:** [October 21, 2022, 4:10pm UTC](https://forums.unrealengine.com/t/how-to-move-more-then-1-object-on-spline/673842/6 "2022-10-21T16:10:47Z")

</div>

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.

 ![Kettenförderband_mit_Mittenverstellung_für_Rotor_Elektrolenkung](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/4/b/94b60d59afb5a39e5a48c68a0a5e51048e4febe1.jpeg)

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

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 21, 2022, 4:12pm UTC](https://forums.unrealengine.com/t/how-to-move-more-then-1-object-on-spline/673842/7 "2022-10-21T16:12:45Z")

</div>

> [@DarkMicrowave](#):
>
> Is that a good idea or is the physics too unreliable?

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

> [@Move actor on conveyor belt unreal engin4](https://forums.unrealengine.com/t/move-actor-on-conveyor-belt-unreal-engin4/470355/5):
>
> Can you confirm this is what you want: [[Image from Gyazo]](https://gyazo.com/fd3e2df5e96f1b7a049a7a010deb1d91) I’ll zip the project and push it your way if you’re happy with this functionality.

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:

> [@Move actor on conveyor belt unreal engin4](https://forums.unrealengine.com/t/move-actor-on-conveyor-belt-unreal-engin4/470355/11):
>
> Can you briefly tell what’s going on here? Static meshes sliding along a spline, they get recycled when they reach the end? How close am I?

---

<div class="post-metadata">

**Author:** ![DarkMicrowave](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DarkMicrowave](https://forums.unrealengine.com/u/DarkMicrowave)\
**Post date:** [October 21, 2022, 4:47pm UTC](https://forums.unrealengine.com/t/how-to-move-more-then-1-object-on-spline/673842/8 "2022-10-21T16:47:38Z")

</div>

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](https://blueprintue.com/render/vkbt-kyr/)

Zoom out to see the complete BP
