spawning components along dynamic spline

Hey there,
How can I spawn components (NOT spline mesh components) along a spline component (at each point), spline which is modified dynamically ?
When using “add staticmesh component” node, it adds one at each spline point on each tick. I want to add only one each spline point, that follows the point when the spline is modified.

Thanks for your link.
The difference in my case is that the components cannot be generated at construct, since the spline is modified at runtime. It comes from the teleport system of the VR template. The spline is generated by simulating a projectile trajectory and adding points to itself. For now I’ve tried spawning the components when teleport is activated, depending on the number of segments of the spline, but it keeps spawning more and more components…

Alright Thanks @Everynone, I finally got it working !
I made a custom event called when teleport is activated. I have to manually set the number of components I want to place but if works, thanks to the link above. Thanks again !

Yes I could, but as the number can change at runtime, the components won’t be spawned at new points (or removed from previous points).

Plenty of examples here:

Instead of distributing static meshes along a spline, you spawn them at spline points which is actually easier.

I want to add only one each spline
point, that follows the point when the
spline is modified.

Components cannot be attached to a spline point per se. When you update the spline, you need to update the components’ positions to match the updated location of the spline points. Also in the link above.

You could count spline points and spawn that many components.

I finally found a way to get the spline point numbers and update the components number - I have to store all the components into an array and clear the array each spline points number change.

Sounds like you’re creating a waypoint system. How close am I?

I see, virtual pillaging and such. Good luck!

Not exactly… :slight_smile:
(and it’s not working properly on the screenshot)

Thanks a lot !