Merge pull request #84174 from jsjtxietian/hide_debug_collision_shape_when_csgshape_invisible

Hide CSGShape's `debug_collision_shape` when it is invisible
This commit is contained in:
Rémi Verschelde 2023-10-30 13:57:42 +01:00
commit 23bcb702ec
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -573,6 +573,11 @@ void CSGShape3D::_notification(int p_what) {
// Update this node's parent only if its own visibility has changed, not the visibility of parent nodes
parent_shape->_make_dirty();
}
if (is_visible()) {
_update_debug_collision_shape();
} else {
_clear_debug_collision_shape();
}
last_visible = is_visible();
} break;