mirror of
https://github.com/godotengine/godot.git
synced 2024-12-03 09:52:18 +08:00
Fix SubViewport physics picking
Apply the logic of `handle_input_locally` for physics picking.
This commit is contained in:
parent
7827c8e370
commit
7b00c136a1
@ -738,6 +738,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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user