From 004ced89aa195c4caa209e3b8bbac1aed0d661a7 Mon Sep 17 00:00:00 2001 From: kobewi Date: Thu, 31 Mar 2022 18:02:18 +0200 Subject: [PATCH] Fix name of the created static trimesh body --- editor/plugins/mesh_instance_3d_editor_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp index 8f285cb7f97..d33803213a3 100644 --- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp +++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp @@ -75,7 +75,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) { CollisionShape3D *cshape = memnew(CollisionShape3D); cshape->set_shape(shape); StaticBody3D *body = memnew(StaticBody3D); - body->add_child(cshape); + body->add_child(cshape, true); Node *owner = node == get_tree()->get_edited_scene_root() ? node : node->get_owner(); @@ -110,7 +110,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) { CollisionShape3D *cshape = memnew(CollisionShape3D); cshape->set_shape(shape); StaticBody3D *body = memnew(StaticBody3D); - body->add_child(cshape); + body->add_child(cshape, true); Node *owner = instance == get_tree()->get_edited_scene_root() ? instance : instance->get_owner();