Skip to content
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

Implement MOUSE_MODE_CAPTURED for iOS #92255

Open
celyk opened this issue May 22, 2024 · 1 comment
Open

Implement MOUSE_MODE_CAPTURED for iOS #92255

celyk opened this issue May 22, 2024 · 1 comment

Comments

@celyk
Copy link

celyk commented May 22, 2024

Tested versions

v4.2.1.stable.official [b09f793]

System information

iPadOS 17.4, iPad 9th gen

Issue description

I'm trying to use a bluetooth mouse on my iPad to control an FPS camera. To do this, the mouse should be locked into the center of the screen and hidden. I tried MOUSE_MODE_CAPTURED but it has no affect. It is not implemented.

Keyboard and mouse gaming is possible to do on iPad today. For instance, I can play FPS games through Steam link just fine. See this talk by Apple. It has a mouse locking example at 7:30
https://developer.apple.com/videos/play/wwdc2020/10617

Steps to reproduce

Minimal script for enabling mouse lock/capture

extends Node

func _ready():
	DisplayServer.mouse_set_mode(DisplayServer.MOUSE_MODE_CAPTURED)

Minimal reproduction project (MRP)

mouse-capture-MRP.zip

@bruvzg
Copy link
Member

bruvzg commented May 22, 2024

Currently, we are using only touch input (mouse events are emulated), but on recent iOS versions it should be possible to read raw mouse input directly. I'm not sure about MOUSE_MODE_CAPTURED and hiding cursor. Seems to be possible as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants