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.
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.
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.
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?
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.
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…