浏览代码

Call MeshShapeSettings->Sanitize when creating the shape

Lucien Greathouse 4 月之前
父节点
当前提交
46998ac774
共有 1 个文件被更改,包括 4 次插入0 次删除
  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);
 }