-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix global position for InputEventMouse
in viewport::push_input
#88473
Fix global position for InputEventMouse
in viewport::push_input
#88473
Conversation
Global position doesn't get adjusted within `InputEventMouse::xformed_by()`.
a573c44
to
8de3991
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested a little, seems to work fine now. 👍
The change makes sense to me but I'm not that familiar with the input code though. 🙃
@Sauermann BTW pretty much the only place where Viewport::_make_input_local
is used is:
Lines 3340 to 3345 in 5f05e2b
Ref<InputEvent> ev; | |
if (!p_local_coords) { | |
ev = _make_input_local(p_event); | |
} else { | |
ev = p_event; | |
} |
So I wonder if
InputEventMouse.global_position
would be correct/meaningful in case p_local_coords
is true? Not sure what is expected / how it's supposed to work, just mentioning in case you overlooked / haven't considered this.But even it there's something to change it's likely for another PR / this one is good as is.
Thanks for the comment. |
Thanks! |
Should be fine for cherry-picking? |
Yes, it should be fine. |
Cherry-picked for 4.2.2. |
# Why Godot v4.2.2 and V4.1.4 are out # What - update the workflows and added support for Godot v4.2.2 and V4.1.4 - fix workflow errors using invalid matrix parameters - fix failing test related to the Godot global_position fix godotengine/godot#88473
Global position doesn't get adjusted within
InputEventMouse::xformed_by()
.resolve #88460
regression from #69598