diff options
Diffstat (limited to 'editor/plugins/mesh_instance_3d_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/mesh_instance_3d_editor_plugin.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp index e8976667dd..2ebb4d29c5 100644 --- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp +++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp @@ -214,7 +214,11 @@ void MeshInstance3DEditor::_menu_option(int p_option) { return; } - Mesh::ConvexDecompositionSettings settings; + Ref<MeshConvexDecompositionSettings> settings = Ref<MeshConvexDecompositionSettings>(); + settings.instantiate(); + settings->set_max_convex_hulls(32); + settings->set_max_concavity(0.001); + Vector<Ref<Shape3D>> shapes = mesh->convex_decompose(settings); if (!shapes.size()) { |