Fix event transform in SubViewportContainer

The transform does not take the canvas transform into account.
This commit is contained in:
Markus Sauermann 2022-03-30 20:56:36 +02:00
parent 5ba3b993d5
commit c8573ea3df

View file

@ -176,7 +176,7 @@ void SubViewportContainer::input(const Ref<InputEvent> &p_event) {
return;
}
Transform2D xform = get_global_transform();
Transform2D xform = get_global_transform_with_canvas();
if (stretch) {
Transform2D scale_xf;
@ -203,7 +203,7 @@ void SubViewportContainer::unhandled_input(const Ref<InputEvent> &p_event) {
return;
}
Transform2D xform = get_global_transform();
Transform2D xform = get_global_transform_with_canvas();
if (stretch) {
Transform2D scale_xf;