Skip to content

Commit

Permalink
Fixed CSG debug collision shapes being visible in editor. Also undid …
Browse files Browse the repository at this point in the history
…an old, incorrect fix which made debug collision visibility depend on CSG visibility.
  • Loading branch information
MajorMcDoom committed Jan 5, 2024
1 parent 89cc635 commit 7b9e280
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions modules/csg/csg_shape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ void CSGShape3D::_update_collision_faces() {
}

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() {
Expand Down Expand Up @@ -575,11 +575,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;

Expand Down

0 comments on commit 7b9e280

Please sign in to comment.