Skip to content

Commit

Permalink
Merge pull request #85665 from Sauermann/fix-4.2-subviewport-physics-…
Browse files Browse the repository at this point in the history
…picking

[4.2] Fix SubViewport physics picking
  • Loading branch information
akien-mga authored Dec 5, 2023
2 parents 17888fb + ab7b662 commit 289472d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scene/main/viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,14 @@ void Viewport::_process_picking() {

while (physics_picking_events.size()) {
local_input_handled = false;
if (!handle_input_locally) {
Viewport *vp = this;
while (!Object::cast_to<Window>(vp) && vp->get_parent()) {
vp = vp->get_parent()->get_viewport();
}
vp->local_input_handled = false;
}

Ref<InputEvent> ev = physics_picking_events.front()->get();
physics_picking_events.pop_front();

Expand Down

0 comments on commit 289472d

Please sign in to comment.