diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index b395c908439e..f024e4e16db0 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -2945,6 +2945,16 @@ void Viewport::push_input(const Ref &p_event, bool p_local_coords) { } local_input_handled = false; + if (!handle_input_locally) { + Viewport *vp = this; + while (true) { + if (Object::cast_to(vp) || !vp->get_parent()) { + break; + } + vp = vp->get_parent()->get_viewport(); + } + vp->local_input_handled = false; + } Ref ev; if (!p_local_coords) {