Skip to content

Commit

Permalink
Hide CSGShape's debug_collision_shape when it is invisible
Browse files Browse the repository at this point in the history
  • Loading branch information
jsjtxietian committed Oct 30, 2023
1 parent 9144457 commit 173e2c7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/csg/csg_shape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 173e2c7

Please sign in to comment.