Skip to content

Commit 91c66b5

Browse files
committed
Merge pull request #86699 from MajorMcDoom/editor-csg-collision-gizmo-fix
Fix `CSGShape3D` debug collision shapes being visible in editor
2 parents 27552a2 + a9e51c3 commit 91c66b5

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

modules/csg/csg_shape.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ Ref<ConcavePolygonShape3D> CSGShape3D::bake_collision_shape() {
513513
}
514514

515515
bool CSGShape3D::_is_debug_collision_shape_visible() {
516-
return is_inside_tree() && (get_tree()->is_debugging_collisions_hint() || Engine::get_singleton()->is_editor_hint());
516+
return !Engine::get_singleton()->is_editor_hint() && is_inside_tree() && get_tree()->is_debugging_collisions_hint();
517517
}
518518

519519
void CSGShape3D::_update_debug_collision_shape() {
@@ -604,11 +604,6 @@ void CSGShape3D::_notification(int p_what) {
604604
// Update this node's parent only if its own visibility has changed, not the visibility of parent nodes
605605
parent_shape->_make_dirty();
606606
}
607-
if (is_visible()) {
608-
_update_debug_collision_shape();
609-
} else {
610-
_clear_debug_collision_shape();
611-
}
612607
last_visible = is_visible();
613608
} break;
614609

0 commit comments

Comments
 (0)