summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2022-03-30 20:56:36 +0200
committerMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2022-03-30 20:56:36 +0200
commitc8573ea3dfc7221ef7129aea252b3550114c9cd4 (patch)
tree529e96a501332e6bdb496f19223249857375e207 /scene
parent5ba3b993d5889f2c9f8a1ebdf6854e5f675fd148 (diff)
Fix event transform in SubViewportContainer
The transform does not take the canvas transform into account.
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/subviewport_container.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/subviewport_container.cpp b/scene/gui/subviewport_container.cpp
index 4d59a12f97..68281b6a72 100644
--- a/scene/gui/subviewport_container.cpp
+++ b/scene/gui/subviewport_container.cpp
@@ -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;