The Body Setup of a Static Mesh with Simple Collision will pass validation.
The Collision Complexity option, Use Complex as Simple, uses the Complex Collision as Simple Collision.
Consequently, I would think the Simple Collision of a Static Mesh with Use Complex as Simple would be unimportant, as it would be using the Complex Collision instead.
If I use the following code to validate the Body Setup of a Static Mesh with Complex Collision, Simple Collision, and Use Complex as Simple, the validation will succeed:
However, if I remove the Simple Collision, and validate again, the validation will fail with the following error:
“Bone None requires at least one collision shape”
This seems contrary to Use Complex as Simple. I would expect it to create the body setup as if the Complex Collision were the simple collision, and have no errors.
Please see the attached repro project and repro steps to verify the findings I have stated above.
Is this a bug? Alternatively, contrary to what the property name would suggest, are our Static Meshes being set up wrong? Should Static Meshes have Simple Collision even if Use Complex as Simple is set? Please advise.
I understand this is an obscure issue, but it is causing issues in our project. Your help is greatly appreciated.
It does look like a bug / inconsistency to me but I could be incorrect, I went ahead and asked Epic for clarification regarding this and will update here after.
Your meshes look to be set up properly.
Looking at the way the validation in UBodySetup is setup, it doesn’t account for Complex as simple - it just checks if AggGeom is populated, which is a Simplified collision representation that holds primitive shapes.
As you mentioned, a workaround would be to have a small dummy simple collision box setup in the meantime to pass the validation check - or to skip the UBodySetup check if the mesh is using Complex as simple.
Just to add to the above this issue, after enabling sub-object validation we are also seeing this error on spline mesh components which intentionally have no collision (decals). It seems to expect AggGeom to be populated, even if both the asset and spline are set to use NoCollision.
Steps to repro:
Place spline mesh actor in a blank level
Create static mesh with 0 collision shapes
Set static mesh Collision Preset to “NoCollision”
Assign mesh to the spline
Set spline to Collision Preset “NoCollision”
Save level and observe error
Although the UBodySetup isn’t “valid”, AggGeom is intentionally empty in this case. Is this an oversight in the validation? Or, is the validity of the UBodySetup on these sub-objects simply not relevant in the first place?
Apologies for the delay, I went ahead and added this onto the question to Epic - they have a couple other spinning plates and I’ll update this once I get the information.