Spline at runtime?

Am my doing something wrong here? When using spline system at runtime, it just adds and keeps on adds meshes and not remove them like contrsuct does. What am my missing here to get it like contrusct does?

Yes, blueprint constructor always starts from scratch. It’s really convenient, but it makes you relax and when you start doing this stuff in Event Graph or in C++, suddenly everything is a bit more complicated.

Anyway, before constructing a spline, you need to clear it first, all previously added spline meshes included.

Use [Clear Spline Points] node to clear a spline, and when you add spline mesh components, add them all to array. Destroy all components and clear the array before each new cycle.

5 Likes

Hi, I made a video on using a Spline at Runtime. I hope it helps: How to Move a Spline at Runtime

The thing for me was that “Clear array”. It helped a lot. Thank you! :slightly_smiling_face: