Linetrace not working as expected with complex collision


I have a procedurally generated world, so I use Procedural Mesh Component (yeah, I know, I should use RMC, but it’s not compatible with 4.19 for now) with “Use complex as Simple Collision”.

But I noticed I add weird collision with LineTrace. Everything works great with “normal” physic collision, but not with LineTrace, so I set up an actor that fire LineTrace on one of my procedurally generated mesh.

PS: It doesn’t change anything if I check the “Trace complex”, and it’s kinda normal as I used “complex as simple”, so simple = complex.

And I ended up with this :

So it appear that some line trace make a hit outside my mesh. I suspect a weird optimization as it seems that the shape of the supposed collision box is sometimes aligned with X and Y axis… Or a simple box calculation?

My box isn’t even a complex shape! (Note: it’s not a closed mesh, it’s a box with a missing face, there’s no face at the bottom)

So does anyone have an idea on why does that happen? Is it a bug from the unreal engine? Is it something I did wrong?
Again, everything works fine, I have normal collisions with the mesh, it’s just the “LineTrace” function that behaves weirdly!


Here is another procedurally generated mesh. The right part behave normaly, but the left part behave weirdly…

Sadly, you can’t see the collisions of a procedurally generated mesh… (It just display the mesh as unlit).

But like I said, the collision works great. It’s just the “LineTrace” function that doesn’t work properly.

Have you tried to visualise the collision? Alt+c in editor or show collision in PIE? Might help you see what your collision looks like

Could it be that the collision is being updated on the parts you’ve modified there? Maybe you can force the mesh to update its collision

Ok, I created a minimum working example. You’ll need two actors :

One to draw the points on the hits of LineTrace

And one to create a big mesh quite far

And here the result :

I don’t think so, take a look at the minimum working example…


We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.


Ok, so I created a MWE project that you can find here : - Google Drive

Here is the screen of what’s expected vs the result :

I submitted a bug report using Jeff link, but as it’s a very specific problem, I dont expect to be solved any time soon :confused:
So has anyone an idea on how to bypass this bug ?

Sorry to up this post, but I still didn’t find a good way to solve that :confused:
I tried to create smaller procedural meshs, but it just reduce the problem.

I think that Line Trace is basically innacurate with procedural mesh.