[ProceduralMesh] ProceduralMesh collision doesn't work once the game is packaged

Premise

Hello guys,

in our project we have a procedural generated terrain, because we have a random map generation system.
It worked perfectly well in 4.11, and it seemed to work when we upgraded to 4.13 too. Unfortunately when we packaged it again, we discovered that it had some issues.

After some testing, we found out that terrain collisions wasn’t working at all. We created a fresh project to reproduce it.

Issue Description

Procedurally generated mesh works as expected while developing the game (both in the editor and in standalone), but in the packaged project (Win64) its collisions won’t work.

Expected behavior

Procedurally mesh’s collision should be consistently working both in the editor and in the packaged version.

How to reproduce

We prepared a test scenario:

  • Create a new “Basic Code” c++ project called “ProceduralMeshTest”
  • Extract the given .rar file (Sourcecode and Content) in the project folder
  • Generate VisualStudio project files and compile
  • Open the project in the editor: it should start in “NewMap”. Play it.
  • After a second, the actor that should be in front of you will generate his mesh
  • When clicking the left mouse button, the controller does a trace under the mouse cursor, and report if it hitted something or not. Notice that both the floor and the generated mesh interact with the trace. You can move and collide with the actor physically too.
  • Package the project (Development - Win64, we verified that the shipping build has the same behaviour too).
  • Run the packaged project: after a second the actor will again generate his mesh, but it won’t interact with the trace nor physically (you can pass throught it).

Extra info

We think the problem was introduced with 4.13, but we’re sure that i was totally working only in 4.11.2.
We found a couple of (maybe) related questions:

For the first in particular this issue was opened, but then closed with “cannot reproduce”.

Thanks in advance, cheers.

[edit 1] fixed some typos.

Hello zamy,

Thank you for your report

We had this same issue reported a couple days ago by another user and I was able to reproduce it. You can find that report here: UE-38478. The one that you linked is a bit different as it was only referring to player controlled pawns not colliding which I was also not able to reproduce.

The only issue I’m seeing is that sweep collision isn’t working with Procedural Meshes, which is similar to the way tracing is done so I would expect it to have the same behavior. It seems that this only affects Procedural Meshes generated at runtime however so anything created in the Construction Script should be able to collide as usual.

Oh i’m sorry, i searched but missed it.

Anyway, i saw it not colliding both with trace and player controlled pawns.

We are using runtime generated mesh, too bad we can’t go with the construction script: we’ll wait :slight_smile:

Meanwhile, thanks for you help, i’ll keep an eye on the report :slight_smile:

It’s okay, the report was just put in today so it wasn’t in when you made this post.

Is there any update on this issue ? I am facing the same problem while packaging the game procedural mesh collision doesn’t work.

They solved it.
I cherry picked it and it works (not sure if it"s out with the new patch)

Hello & zamy,

This fix should be included in the 4.15 Preview 1 if you would like to test it there. While we don’t suggest development on Preview builds, it’s useful to seeing what is to come and finding new bugs. The changelist this fix went in on was before we branched for 4.15 so it should be included in anything 4.15 related.