Browse Source

Call MeshShapeSettings->Sanitize when creating the shape

Lucien Greathouse 4 months ago
parent
commit
46998ac774
1 changed files with 4 additions and 0 deletions
  1. 4 0
      JoltCImpl/JoltC.cpp

+ 4 - 0
JoltCImpl/JoltC.cpp

@@ -1450,6 +1450,10 @@ JPC_API bool JPC_MeshShapeSettings_Create(const JPC_MeshShapeSettings* self, JPC
 	JPH::MeshShapeSettings settings;
 	JPC_MeshShapeSettings_to_jph(self, &settings);
 
+	// MeshShapeSettings calls Sanitize in its default constructor, but we don't
+	// have constructors in C. It's probably fine to always Sanitize.
+	settings.Sanitize();
+
 	return HandleShapeResult(settings.Create(), outShape, outError);
 }