Fix remaining physics and navigation disabling issues.

This commit is contained in:
WhalesState
2025-07-12 17:12:05 +03:00
parent c6d130abd9
commit 5eee6d22a0
5 changed files with 28 additions and 11 deletions

View File

@@ -1634,8 +1634,8 @@ void RuntimeNodeSelect::_root_window_input(const Ref<InputEvent> &p_event) {
if (camera_override) {
if (node_select_type == NODE_TYPE_2D) {
is_dragging_camera = panner->gui_input(p_event, Rect2(Vector2(), root->get_visible_rect().get_size()));
} else if (node_select_type == NODE_TYPE_3D && selection_drag_state == SELECTION_DRAG_NONE) {
#ifndef _3D_DISABLED
} else if (node_select_type == NODE_TYPE_3D && selection_drag_state == SELECTION_DRAG_NONE) {
if (_handle_3d_input(p_event)) {
return;
}
@@ -1807,8 +1807,8 @@ void RuntimeNodeSelect::_physics_frame() {
}
}
}
} else if (node_select_type == NODE_TYPE_3D) {
#ifndef _3D_DISABLED
} else if (node_select_type == NODE_TYPE_3D) {
if (selection_drag_valid) {
_find_3d_items_at_rect(selection_drag_area, items);
} else {
@@ -2175,7 +2175,7 @@ void RuntimeNodeSelect::_update_selection() {
if (visual_instance) {
bounds = visual_instance->get_aabb();
} else {
#ifndef PHYSICS_2D_DISABLED
#ifndef PHYSICS_3D_DISABLED
CollisionShape3D *collision_shape = Object::cast_to<CollisionShape3D>(node_3d);
if (collision_shape) {
Ref<Shape3D> shape = collision_shape->get_shape();
@@ -2183,7 +2183,7 @@ void RuntimeNodeSelect::_update_selection() {
bounds = shape->get_debug_mesh()->get_aabb();
}
}
#endif // PHYSICS_2D_DISABLED
#endif // PHYSICS_3D_DISABLED
}
Transform3D xform_to_top_level_parent_space = node_3d->get_global_transform().affine_inverse() * node_3d->get_global_transform();