godot icon indicating copy to clipboard operation
godot copied to clipboard

Mouse Capture not working on Android

Open MichaelDawe opened this issue 10 months ago • 0 comments

Tested versions

Reproducible in 4.3.stable.official EDIT: also reproducible in 4.4.rc1

System information

Godot v4.3.stable - Windows 10.0.22000 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 3060 Ti (NVIDIA; 32.0.15.6590) - 11th Gen Intel(R) Core(TM) i5-11400 @ 2.60GHz (12 Threads)

Issue description

The mouse can't be captured on Android devices, it still hits the edge of the screen and is visible.

I am using a USB mouse.

Tested with Google Pixel 8a with Android 15 and Samsung Tab s8+ with Android 14.

I am using the standard mouse capture which works on Windows.

Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)

I also tried using Input.warp_mouse() but noticed that the docs say this doesn't work on Android, and indeed it didn't help.

I would expect the mouse to be locked to the centre of the screen and made invisible, the same way it works on Windows, and on other Android games which use a mouse to move the camera in 3D.

Steps to reproduce

Create a project using MOUSE_MODE_CAPTURED and install on an Android device. Connect a USB mouse and move it. I don't have a Bluetooth mouse, but I assume the issue would be the same, worth checking though.

Minimal reproduction project (MRP)

mouse_capture_android.zip

MichaelDawe avatar Feb 22 '25 23:02 MichaelDawe