Spline Blueprint with replaceble parts of mesh

Hello. So I created spline blueprint following this tutorial.

I want to modify it, if it is possible. I would like to have a opportunity to replace some parts of the spline, here is an example:

At the top there is a regular spline with repeatable mesh. 2 rest ones have one part changed, of course I want to chose the exact place where I want to put another static mesh. I am pretty new in Unreal, so I dont know how can I do that and if it is possible or not.

I would appreciate any help or suggestions. Thanks

It’s definitely possible with blueprints. You can make an array of static meshes, assign those using a loop to different parts of a spline, expose that array, and drag in replacement meshes for whatever numbered slot you want.

1 Like

okay, thank you so much.
Can you suggest me some topics/videos which can help me with creating that blueprint?

Here’s a really basic version, let me know if you have any issues or questions.

I created a blueprint actor with a spline component. In the construction script I’m getting the length of the spline, getting a variable called mesh length, and figuring out how many meshes have to be placed to fit the spline. Then I’m comparing the mesh number needed versus the length of the static mesh array, if it’s too small, I add static meshes using the default mesh until it’s the right length, if it’s too large, I’m resizing the array. Once it’s the right size, I add a spline mesh component, reference the array to set the static mesh, and get the position for it based off the spline locations.

1 Like

Oh and if you want working tangents:

1 Like

Wow, that worked exactly as I wanted. Thank you wo much. I will use your node set in my future projects, though I simplified it a bit since it works for me:

I used “Get number of spline points node” instead of counting the amound of meshes to fit the spline, because that array is more like organic liane.

Thank you again!

1 Like