Collision Detection of Spline Meshes at Runtime

Hey everybody,

I’m having an issue detecting collisions of spline meshes that are generated at runtime. I set up an actor that allows me to drag out a simple 2-point spline that stretches a mesh across its length. Now I want to set up a way of detecting if two of those actors overlap.


(this shows the debug view of collisions, they’re definitely there.

Here’s the mesh being spawned:

And here’s the relevant code:


The events being triggered by the “on Component begin/end overlap” are just Prints for now.

Here’s an example of how they’re supposed to work:

The curious thing is that placing them in the map before run time and moving another actor close generates responses:

But moving the same actor into a editor-placed version of itself does not:

Any and all help is greatly appreciated!

I don’t know much about splines, but since it seems like they are all going to be straight lines that (I assume) don’t move around in game, you could try just doing a line trace from one end to the other. You can have it ignore the actor doing the trace.

If there is a possibility of multiple overlaps there is even a multi-line trace, but that one is kind of wonky to use sometimes so you might want to watch a video on it.

Open the mesh you use for the SMC and set Collision Complexity to Use Complex as Simple. Not guaranteed to help here but worth trying. Dynamically generated spline mesh collision shape deformation is notoriously iffy in general.


Also, as suggested above, you could probably (sphere) trace from A to B instead.

@Detach789 Absolutely, that would definitely be a solution for this concrete situation, but a) I’m still very curious about why this isn’t working as you’d expect and b) if I want to include more than two points for a non-straight spline down the line, it doesn’t work any more

@Everynone The videos above are set to Use Complex as Simple and produce the results you see. If I set it to Simple as Complex it definitely does something, but the results are inconsistent at best, it seems to only trigger close to the origin:

Did you find a solution to this? I am in a similar situation.

I have a spline & spline mesh that is generated on BeginPlay in C++. I have the sample mesh collision complexity set as “Complex as Simple” and the spline mesh collision is set to “Query and Physics”.
I do a line trace from the start to the end of the spline but the line trace doesn’t return a hit with other spline meshes.

I’m trying the same but with roads. Have you found the solution for your line trace problem? Maybe try the Multi Line Trace?