Skip to content

Commit

Permalink
Fix NavigationObstacle3DEditor parenting error
Browse files Browse the repository at this point in the history
Fixes NavigationObstacle3DEditor parenting error.
  • Loading branch information
smix8 committed Oct 27, 2023
1 parent ba79e53 commit e8caa0a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion editor/plugins/navigation_obstacle_3d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,11 @@ void NavigationObstacle3DEditor::edit(Node *p_node) {
wip.clear();
wip_active = false;
edited_point = -1;
p_node->add_child(point_lines_meshinstance);
if (point_lines_meshinstance->get_parent()) {
point_lines_meshinstance->reparent(p_node, false);
} else {
p_node->add_child(point_lines_meshinstance);
}
_polygon_draw();

} else {
Expand Down

0 comments on commit e8caa0a

Please sign in to comment.