diff options
author | smix8 <52464204+smix8@users.noreply.github.com> | 2023-01-26 16:10:26 +0100 |
---|---|---|
committer | smix8 <52464204+smix8@users.noreply.github.com> | 2023-04-07 22:39:25 +0200 |
commit | 1549aeaef8d16d6dd6b1f27380bf00ca23e1001d (patch) | |
tree | 22ece2afee381e797746b3dd8a4934e7c0716c20 /editor/plugins/mesh_instance_3d_editor_plugin.cpp | |
parent | f38b54027308529b7dbc243d1c70e7e5e69473a6 (diff) | |
download | redot-engine-1549aeaef8d16d6dd6b1f27380bf00ca23e1001d.tar.gz |
Add Mesh ConvexDecompositionSettings wrapper
Adds wrapper MeshConvexDecompositionSettings to control parameters for Mesh ConvexDecomposition operations.
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()) { |