diff --git a/scene/gui/viewport_container.cpp b/scene/gui/viewport_container.cpp index bee711ff7..e748a6c10 100644 --- a/scene/gui/viewport_container.cpp +++ b/scene/gui/viewport_container.cpp @@ -147,7 +147,7 @@ void ViewportContainer::_input(const Ref &p_event) { return; } - Transform2D xform = get_global_transform(); + Transform2D xform = get_global_transform_with_canvas(); if (stretch) { Transform2D scale_xf; @@ -174,7 +174,7 @@ void ViewportContainer::_unhandled_input(const Ref &p_event) { return; } - Transform2D xform = get_global_transform(); + Transform2D xform = get_global_transform_with_canvas(); if (stretch) { Transform2D scale_xf;