Skip to content

Commit a9e51c3

Browse files
committed
Fixed CSG debug collision shapes being visible in editor. Also undid an old, incorrect fix which made debug collision visibility depend on CSG visibility.
1 parent 27552a2 commit a9e51c3

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)