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
Windows 10 - Chrome 128 - Godot 4.3.stable - Compatibility
Issue description
My game is using Input.mouse_mode = MOUSE_MODE_CONFINED_HIDDEN because you're suposed to move your cursor a lot inside of it. The mode doesn't seem to work on web, it doesnt hide or confine the cursor.
I don't know if this is on pourpouse - it might be -but if it is, it's undocumented.
On windows (working correctly)
On web (not working)
Is there a way to fix this?
Steps to reproduce
How to test the MRP
Play the project both on windows and the web
Open 'main.gd' file and uncomment line 7
Play again both on windows and the web (it won't work on the web)
ERR_FAIL_COND_MSG(p_mode == MOUSE_MODE_CONFINED || p_mode == MOUSE_MODE_CONFINED_HIDDEN, "MOUSE_MODE_CONFINED is not supported for the Web platform.");
MOUSE_MODE_CONFINED_HIDDEN isn't supported on web. The error message here could probably be clearer as it only mentions MOUSE_MODE_HIDDEN and fails to mention MOUSE_MODE_CONFINED_HIDDEN.
An immediate solution for you might to do something like this: Input.mouse_mode = Input.MOUSE_MODE_HIDDEN if OS.get_name() == "Web" else Input.MOUSE_MODE_CONFINED_HIDDEN
I'm happy to do any work on improving the error message or documentation if I can get some direction on it.
Would it make sense for MOUSE_MODE_CONFINED_HIDDEN to fallback to MOUSE_MODE_HIDDEN on Web?
Tested versions
System information
Windows 10 - Chrome 128 - Godot 4.3.stable - Compatibility
Issue description
My game is using
Input.mouse_mode = MOUSE_MODE_CONFINED_HIDDEN
because you're suposed to move your cursor a lot inside of it. The mode doesn't seem to work on web, it doesnt hide or confine the cursor.I don't know if this is on pourpouse - it might be -but if it is, it's undocumented.
On windows (working correctly)
On web (not working)
Is there a way to fix this?
Steps to reproduce
How to test the MRP
Minimal reproduction project (MRP)
mouse_filter_test.zip
The text was updated successfully, but these errors were encountered: