mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 17:41:19 +00:00
Add Mesh ConvexDecompositionSettings wrapper
Adds wrapper MeshConvexDecompositionSettings to control parameters for Mesh ConvexDecomposition operations.
This commit is contained in:
parent
f38b540273
commit
1549aeaef8
13 changed files with 390 additions and 98 deletions
|
|
@ -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()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue