You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While "scaled" mouse position values are returned by:
InputEventMouseMotion.global_position
CanvasItem.get_global_mouse_position
This happens only after resizing (or maximizing) a window.
Steps to reproduce
Display -> Window -> Stretch:
Mode = canvas_item
Aspect = expand
Scene with a control node. Override _gui_input method and log InputEventMouseMotion and InputEventMouseButton events together with get_global_mouse_position result.
Before resizing a window (InputEventMouseButtonB is the same as others):
Please upload a project, to help with testing this and identifying the exact problem
A small Godot project which reproduces the issue, with no unnecessary files included. Be sure to not include the .godot folder in the archive (but keep project.godot).
Having an MRP is very important for contributors to be able to reproduce the bug in the same way that you are experiencing it. When testing a potential fix for the issue, contributors will use the MRP to validate that the fix is working as intended.
Drag and drop a ZIP archive to upload it (max 10 MB). Do not select another field until the project is done uploading.
Note for C# users: If your issue is not C#-specific, please upload a minimal reproduction project written in GDScript. This will make it easier for contributors to reproduce the issue locally as not everyone has a .NET setup available.
Tested versions
System information
MacOS 14.1.1 - Vulkan API 1.2.231 - Forward+ - Apple M1 Max
Issue description
Following methods return "system" mouse position values:
InputEventMouseButton.global_position
(left, pressed)While "scaled" mouse position values are returned by:
InputEventMouseMotion.global_position
CanvasItem.get_global_mouse_position
This happens only after resizing (or maximizing) a window.
Steps to reproduce
Display -> Window -> Stretch:
Scene with a control node. Override
_gui_input
method and logInputEventMouseMotion
andInputEventMouseButton
events together withget_global_mouse_position
result.Before resizing a window (InputEventMouseButtonB is the same as others):
After resizing a window (InputEventMouseButtonB is ~2x larger than others):
Where:
CanvasItem.get_global_mouse_position
InputEventMouseButton.global_position
(left, pressed)InputEventMouseMotion.global_position
Minimal reproduction project (MRP)
The text was updated successfully, but these errors were encountered: