Download

Spline building system

Hello guys.

I’m looking for some explainations / a tutorial to be able to construct a building system in game with spline, exactly like in this video :

Does anyone know where I can find some information to do that ? I know already how to construct spline in the editor, but I don’t see how to make my character able to build it in game.

Any help would be appreciated, thank

I could pay for a detailed tuto if anyone is interessted.

Have a great day guys

Edit : I managed to spawn my spline in game, but can’t find how to add a spline point to my spline.
Should I cast something to my BP_spline and then use “add spline point” in the spline BP ? I don’t know how to transfert a position for the next point to the BP_spline

Yeah i’ve progressed a lot by myself.
This is still a bit weird, but it’s working ! I can even spawn several spline, select only one, and add new point to this one

Still mistake to correct, but i’m in the righ way yeah :smiley:

A bit better :

Looks like the tangents are using incorrect indexes - hence the breaks. Is this how you’re doing it:

That’s for 1 SMC per spline segment, the vid is using more than 1 per segment I think.

Thank you for your answer !!

Yes that is exactly what i’m doing, i don’t know why my tangents are wrong :confused: tryied some stuff, but i didn’t find the cause yet.

When i’m in editor mode, it’s all good that is strange :

wall5

Juste added a function to delete a portion of the spline yeahh

My one is literaly like yours, with the set forward axis i added and set collision :

Well, I found it ! It’s actually more complicated :

Yeahhh so glad to nailed it as I just start to learn UE

First let me start off by saying great tune up.

Here’s a question - and perhaps something else for you to look into.

How bad does performance get when the spline exceed 1000 segments?

How about procedural mesh generation instead of using the meshes within the spline?
This should give you an idea:

Because it’s not instantiating 1000 meshes, the end result for the same spline would theoretically not cripple the engine :roll_eyes:

1 Like

Thank you for this ressource MostHost_LA, that’s interesting.
In my situation I can’t actually use this, because I couldn’t remove a portion later with this system.

Here is where I am at with my system ( just did a simple wall for now) :

When i’m building, there is a ghost appearing from the last spline point to the cursor, and add the portion when I click.

Now I need to learn how to set material to each portion.

There’s ways you could now. Have a look, it’s worth knowing.

Ouhh that seems so powerfull ! I’ll read all that tomorrow and make some tests

The “Set Material node” does not seem to work with a spline mesh component :

It does nothing, the line trace still go through

as with 99.9% of the times…
You probably want to create a dynamic material instance and set the dynamic material instance onto it.

Spline components work off the same base object, so that’s probably why it’s not working in what I assume is “mid loop”.
You can try the same operation before you add in the instance - it may make a difference.