summaryrefslogtreecommitdiff
path: root/core/os
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-09-03 12:05:27 +0200
committerGitHub <noreply@github.com>2019-09-03 12:05:27 +0200
commit00258684d3a1402735f404908131841f017fa57c (patch)
tree4e5644348c020da835084ec71974c7966f572818 /core/os
parenta1fe20a57e80fb6594106804fd8d4ba97d49dc06 (diff)
parente21cc3cc8d93fd8fb1837025d6b0d43d71103969 (diff)
Merge pull request #31915 from KoBeWi/xformers
Don't transform global position of mouse input
Diffstat (limited to 'core/os')
-rw-r--r--core/os/input_event.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp
index a40a50cfce..30fca0c155 100644
--- a/core/os/input_event.cpp
+++ b/core/os/input_event.cpp
@@ -450,7 +450,7 @@ bool InputEventMouseButton::is_doubleclick() const {
Ref<InputEvent> InputEventMouseButton::xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs) const {
- Vector2 g = p_xform.xform(get_global_position());
+ Vector2 g = get_global_position();
Vector2 l = p_xform.xform(get_position() + p_local_ofs);
Ref<InputEventMouseButton> mb;
@@ -577,7 +577,7 @@ Vector2 InputEventMouseMotion::get_speed() const {
Ref<InputEvent> InputEventMouseMotion::xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs) const {
- Vector2 g = p_xform.xform(get_global_position());
+ Vector2 g = get_global_position();
Vector2 l = p_xform.xform(get_position() + p_local_ofs);
Vector2 r = p_xform.basis_xform(get_relative());
Vector2 s = p_xform.basis_xform(get_speed());