summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-09-10 09:51:15 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-09-10 09:51:15 +0200
commit91c66b5b7d9238b3a15cb853a153b067e778edba (patch)
tree5f22f3b203057c3c25773540c096ef6316b8928f
parent27552a2f26adcdba579cd804197de3942e8cb0ec (diff)
parenta9e51c3aab3673bf17fd09bd62a3e2b76d224325 (diff)
downloadredot-engine-91c66b5b7d9238b3a15cb853a153b067e778edba.tar.gz
Merge pull request #86699 from MajorMcDoom/editor-csg-collision-gizmo-fix
Fix `CSGShape3D` debug collision shapes being visible in editor
-rw-r--r--modules/csg/csg_shape.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp
index 8777651545..8c81c0ce4e 100644
--- a/modules/csg/csg_shape.cpp
+++ b/modules/csg/csg_shape.cpp
@@ -513,7 +513,7 @@ Ref<ConcavePolygonShape3D> CSGShape3D::bake_collision_shape() {
}
bool CSGShape3D::_is_debug_collision_shape_visible() {
- return is_inside_tree() && (get_tree()->is_debugging_collisions_hint() || Engine::get_singleton()->is_editor_hint());
+ return !Engine::get_singleton()->is_editor_hint() && is_inside_tree() && get_tree()->is_debugging_collisions_hint();
}
void CSGShape3D::_update_debug_collision_shape() {
@@ -604,11 +604,6 @@ 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;