I know SplineMeshes are not ready yet, but when they are, I am very excited about using them in my in-game editor
But for me to be able to manipulate the spline during game time, I would also need to be able to re-create collision on the fly.
I see the function is there already, but it is limited to use with the editor
RecreateCollision
I noticed that RecreateColllision() only worked WITH_EDITOR
is there a reason we cant call this from c++ during game time in a shipping build?
#if WITH_EDITOR
// Builds collision for the spline mesh (if collision is enabled)
void RecreateCollision();
#endif
#I Entreat You To Please Make This Runnable During Game Time
Because then I can fully implement dynamically changeable Spline Meshes in my in-game editor!
(Again my in-game editor is in no way meant to mirror the Rocket Editor, it is an in-game editor because every feature is game-specific and using my own in-game interface).
I’m going to check if it actually depends on anything editor-wise, and if not I’ll remove the #if WITH_EDITOR for you, with a warning that it will probably be slow. In the editor, we had to implement code that defers the recreation of the collision while you are altering a spline, because it was too slow to do realtime while you were dragging points around.
Unfortunately RecreateCollision calls various functions on UBodySetup that on cooked platforms (i.e. non-editor) only support loading cooked physx collision data, not creating it on the fly. Sorry, but making USplineMeshComponent::RecreateCollision() able to be called during game would require this restriction to be lifted, and I don’t think that’s something Epic will want to do.
Is this ever going to happen? I built a game that procedurally generates a spline mesh tunnel at run time and got burned because its not possible. Now I’m currently Greenlit on Steam and don’t know what to do other than making prebuilt levels.
Just ran into the same problem. Wanted to use splines to make the wall system of a RTS game but yeah, the collisions aren’t re-created when spawning splines outside of the editor… :<
Just ran into the same problem. Wanted to use splines to make the wall system of a RTS game but yeah, the collisions aren’t re-created when spawning splines outside of the editor… :<