Skip to content

get_X_mouse_position does not return accurate OS cursor position with tablet pen input. #112970

@Meowlala

Description

@Meowlala

Tested versions

  • Reproducible in 4.5.1-stable, 4.4.1-stable, and 4.6-dev4

System information

Godot v4.6.dev4 - Windows 11 (build 26100) - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated AMD Radeon RX 6650 XT (Advanced Micro Devices, Inc.; 32.0.21033.3005) - 12th Gen Intel(R) Core(TM) i5-12600KF (16 threads) - 31.82 GiB memory

Issue description

Using a tablet + pen as an input device, in my case a Wacom Intuos Pro, mouse position functions return inaccurate / lagging behind positions. They appear to update infrequently, usually only updating when the cursor is outside of the game window. Moving a mouse instantly accurately updates the position.

Likely related to #104659, I was unsure if they were the same exact issue.

InputEventMouseMotion callbacks are still fired consistently even for tablet inputs, so a viable workaround in games is to just set a global mouse position to whatever position was last returned from a mouse motion event.

Video of MRP running, see the console output as I move the tablet pen:

mouse_error.mp4

Steps to reproduce

The MRP is just one scene with this function:

func _process(_delta: float) -> void:
	print(get_global_mouse_position())

The editor also breaks down when controlled with a tablet with some buttons being unpressable and unhighlightable.

Minimal reproduction project (MRP)

mouse-error-mrp.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions