godot-demo-projects icon indicating copy to clipboard operation
godot-demo-projects copied to clipboard

In 3d/global_illumination, the "toggle_mouse_capture" does not work

Open joseph-sch opened this issue 1 year ago • 2 comments

Which demo project is affected:

3d/global_illumination

OS/device including version:

N/R

Issue description:

The overlay says "Escape or F10: Toggle mouse capture" but "toggle_mouse_capture" is not mapped to any of these keys in the project settings.

The issue is in the project.godot file:

https://github.com/godotengine/godot-demo-projects/blob/4a4b46cbe1f5105b664b99f325984096151b75a1/3d/global_illumination/project.godot#L70-L75

The two codes 16777217 and 16777253 correspond to 0x1000001 and 0x1000025 respectively, so the first one is not a valid mapping and the second one maps to KEY_MASK_CMD_OR_CTRL + KEY_PERCENT (which cannot be obtained because the percent key requires pressing Shift, unless I'm mistaken).

The correct lines should be, I assume, like in other 3D projects, e.g.:

https://github.com/godotengine/godot-demo-projects/blob/4a4b46cbe1f5105b664b99f325984096151b75a1/3d/waypoints/project.godot#L59-L64

There are other mappings that appear invalid (see highlighted in yellow in screenshot), but they are not critical.

Screenshots of issue:

image

joseph-sch avatar Dec 18 '23 18:12 joseph-sch

This is an issue caused by upgrading the project to Godot 4, which broke a lot of key bindings. Many other demos may have similar broken binding (I suggest grepping for the keycode value across all projects' project.godot files).

The intended keys are Escape and F10 here.

Calinou avatar Dec 18 '23 18:12 Calinou

I checked all projects which use the toggle_mouse_capture and that input is incorrectly mapped only in 3d/global_illumination.

But indeed, there seem to be other input mapping issues in many project.godot files. For example, these all contain 16777217 or 16777218 i.e. 0x1000001 or 0x1000002:

image

joseph-sch avatar Dec 19 '23 09:12 joseph-sch