diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2023-10-30 13:57:42 +0100 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-10-30 13:57:42 +0100 |
| commit | 23bcb702ec4f0677c35f60681b782cbb05b8b4a9 (patch) | |
| tree | 900e579ab076ac0fc3f2997afa35291d0b4dc001 | |
| parent | 030dcedf93b3e3ae599504d7ee51091259be1616 (diff) | |
| parent | 173e2c7f29c6d4304bf02f895082a34cf30c0908 (diff) | |
| download | redot-engine-23bcb702ec4f0677c35f60681b782cbb05b8b4a9.tar.gz | |
Merge pull request #84174 from jsjtxietian/hide_debug_collision_shape_when_csgshape_invisible
Hide CSGShape's `debug_collision_shape` when it is invisible
| -rw-r--r-- | modules/csg/csg_shape.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index 0656f8224c..0fc61dfe92 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -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; |
