diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-03-31 11:06:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-31 11:06:55 +0200 |
commit | 755e28e88858f796c99067cd32f3894d37700031 (patch) | |
tree | 4bc311a3596fe3ac3b97f2232617a03d42524feb /scene/gui/control.cpp | |
parent | b7850bb1e8e235b60075b14a9b2ccf2dc0ce4a50 (diff) | |
parent | 04728395095835f1d9517f36dd842baa124598f9 (diff) |
Merge pull request #59706 from Sauermann/fix-control-warp-mouse-canvas-transform
Fix Control::warp_mouse to respect canvas transform
Diffstat (limited to 'scene/gui/control.cpp')
-rw-r--r-- | scene/gui/control.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index f0d4ec54ee..2f96ee675f 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -2939,7 +2939,7 @@ Control::MouseFilter Control::get_mouse_filter() const { void Control::warp_mouse(const Point2 &p_position) { ERR_FAIL_COND(!is_inside_tree()); - get_viewport()->warp_mouse(get_global_transform().xform(p_position)); + get_viewport()->warp_mouse(get_global_transform_with_canvas().xform(p_position)); } bool Control::is_text_field() const { |