Spline mesh complex collision missing in packaged game

Hello,

I’m having problems getting spline mesh complex collisions to work in a packaged game, I dont know if its intended or a bug or if i’m just missing something. I have looked around for solutions but haven’t been able to fix it. I can easily reproduce it in a new project in 4.17.

The problem i’m having is I have actor blueprints with spline meshes that are spawned in at runtime. The spline meshes have collision enabled with complex collision. The collision is not working at all after packaging the project.

Some points:

  • It’s working perfect in PIE and standalone play modes, but gone after packaging.
  • Simple collision works fine everywhere, but for this I need complex collision.

Steps to reproduce:

  • New actor blueprint with a spline mesh component, manually set end position and tangents to whatever.
  • Set collision enabled and block all.
  • Set mesh to one with complex collision (I used an imported cube mesh with some loop cuts).
  • Manually place the spline actor in a level.
  • Have another blueprint spawn the spline actor in a level.

In PIE and standalone, both the manually placed actor and the spawned one has collision without problems, but after packaging the spawned one has no collision at all.

I’ve tried many things like adding new spline mesh components instead of spawning actors, setting the start and end of the spline meshes, having collision off and turning it on at runtime etc. Anything that changes the spline mesh in any way breaks the collision for me when the project is packaged.

1 Like

I’m also looking for the solution.

I found that spline mesh collision is ‘intentionally’ disabled in a packaged game. See UStaticMesh::GetPhysicsTriMeshData in StaticMesh.cpp.

It seems modifying the engine code is the only way to go, according to this question: Spline mesh collision missing from packaged build - World Creation - Unreal Engine Forums

Try enabling “Allow CPUAccess” under General Settings of meshes that you want collisions to be enabled.

2 Likes

Thank you very much!!!)

1 Like