I would love to be able to offer people the use of spline meshes in my packaged game with my game-specific level editor!
I cant do this though until we are able to rebuild spline mesh collision at runtime.
I am requesting that you please consider adding the ability to rebuild collision in packaged game!
This request is similar to the request for being able to rebuild collision for dynamically generated meshes
Please consider it dearly as it would mean so much for many people’s projects to be able to rebuild collision in a packaged game setting!
**Code For Reference**
For reference here is what I am talking about
SplineMeshComponent
```
void USplineMeshComponent::CreatePhysicsState()
{
#if WITH_EDITOR
**// With editor code we can recreate the collision if the mesh changes**
const FGuid MeshBodySetupGuid = (StaticMesh != NULL ? StaticMesh->BodySetup->BodySetupGuid : FGuid());
if (CachedMeshBodySetupGuid != MeshBodySetupGuid)
{
RecreateCollision();
}
#else
**// Without editor code we can only destroy the collision if the mesh is missing**
if (StaticMesh == NULL && BodySetup != NULL)
{
DestroyBodySetup();
}
#endif
return Super::CreatePhysicsState();
}
```
Thanks for everything Epic!
Hi , I agree with you. It would be incredibly helpful if there was a way to regenerate collision meshes of SplineMeshComponents during runtime. This could allow for some interesting scenarios in which part of the terrain or obstacles dynamically change and the player has to respond to them. Have you heard anything about this possibly becoming part of the engine in the future?
Is it resolved yet? I am on 4.6 and really need spline mesh collision at runtime. Our whole game revolves around it now and I only just found it out after trying to package it for Windows.
I was reading over your post and I thought that it would make a good feature request. I written a report (UE-15203) and I have submitted it to the developers for further consideration. Thank you for your time and information.
Hi, it’s been 5 years. I’m wondering if this issue has been fixed? I’m still unable to get any collision on dynamically spawned spline meshes in packaged game. Thanks!