Spline Mesh - No Collision in shipping (complex collision)

Hey,

I have got the very annoying problem that I want to create and modify a spline mesh during runtime with collisions. It works perfectly in the editor and standalone version but as soon as I try to build my shipping version it has no collision at all.
I have to use complex collision since I am working with quite complex shapes and need to have them complex. I don’t know what I should do. I have tried different solutions like adding “UEBuildConfiguration.bRuntimePhysicsCooking = true;” to the UEBuildwindows.cs under " public override void ValidateUEBuildConfiguration()". But that didn’t work.
I have removed for testing purpose every mention of “#if WITH_EDITOR || WITH_RUNTIME_PHYSICS_COOKING” in the SplineMeshComponent.cpp but that didn’t work either.
I am getting pretty frustrated at the moment since I can’t figure out where the problem is when it is working perfectly in editor and standalone.

Thanks

Hi Nobody,

Just to verify, how are you setting the mesh and the collision state? Are you doing this all at runtime? Some screenshots of your setup could help.

I’m not sure what will work with your setup but you might be able to work around the issue by setting the mesh and collision directly in the BP before play begins.

Hey,

I have now upgraded to 4.15 and then after setting “WITH_RUNTIME_PHYSICS_COOKING=1” in the ModuleRules.cs I got at least simple collision working on the spline mesh component. It sorta works but it is not the longterm solution I would want with complex collision where I still get no collision.
I am using this for my game on Steam where I have an ingame editor and would want to have complex collision on those splines for accurate collision detection with different physical materials.

132050-rotat2.gif

I am not sure if there is anything else I might have to set to 1 to be able to get complex collision working and I see from your answer that it should be possible?

Is there anything besides WITH_RUNTIME_PHYSICS_COOKING=1 which I would need?

Thanks

Sorry for the delay.

There are some limitations to runtime physics cooking on mobile devices. What platform are you packaging for?

I tested a simple setup with “Use Complex as Simple” collision and it worked fine in a windows packaged project. Would you mind providing a small test project that we can test on this end?

We haven’t heard back from you in a few days, so we are marking this post as resolved for tracking purposes. If you’re still experiencing this issue, please feel free to post back here with additional information to reopen the post.

Cheers,

TJ

why isn’t this allowed at runtime for windows(or any other platform) builds? why does it work in-editor but not at runtime… that doesn’t really make sense. so here we are prototyping a game, and boom fantastic procedurally generated spline meshes look and feel so cool in game, and suprise package a .exe and now it doesn’t work… just seems like there should be some warning before hand to let people know not to waste their time with this…

And still no solution? This engine is very frustrating sometimes.

I found a solution for UE 4.25 (probably for previous versions too, but I didn’t test)

Simply go to the meshes that you are using in your spline, In details section, enable “Allow CPUAccess” under General Settings.

2 Likes

confirmed this worked in 4.24! thanks for the solution!

1 Like

This works for me in 5.1! Thank you so much for sharing the solution!!! :purple_heart:

1 Like

i have the same problem in the version 5.2, What’s more i can’t find “Allow CPUAccess” in details section. Hope anser! :sob::sob::sob::sob::sob: