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

Navigating UI with joypad / gamepad is not working properly. #26825

Closed
fossegutten opened this issue Mar 9, 2019 · 6 comments · Fixed by #26853
Closed

Navigating UI with joypad / gamepad is not working properly. #26825

fossegutten opened this issue Mar 9, 2019 · 6 comments · Fixed by #26853

Comments

@fossegutten
Copy link
Contributor

fossegutten commented Mar 9, 2019

Godot version:
Godot 3.1 RC1

OS/device including version:
Windows 10. Regular Xbox One gamepad.

Issue description:
When holding down arrow keys on keyboard, the focus owner changes as expected. First when just pressed, then it jumps to the next one with a fixed delay ( echo ). I would expect this to happen also when holding down a button on my gamepad, and also when holding down the analog stick.

When holding down a button on the DPad, the focus just changes once. So we need to button mash to get to the end of the menu. Not sure if it is a bug, but i think there should be a simulated echo or something here.

Worst scenario is when using analog stick. It seems it changes focus every time the axis_value changes in the InputEventJoypadMotion. Even worse, it only goes in positive direction ( only down and right ). It should probably use sign of axis_value, instead of the absolute float value?

I dont even think this is a new bug. I think this has never worked. If anyone else know if this worked in the past, please leave a comment!

Steps to reproduce:
Just navigate around a menu with multiple buttons. Or use my sample project, where the Input map and scene is already prepared.

Minimal reproduction project:
ui_axis_bug.zip

@groud
Copy link
Member

groud commented Mar 9, 2019

Similar to #12145, and if I am not mistaking I believe @QbieShay proposed something like that.

@fossegutten
Copy link
Contributor Author

fossegutten commented Mar 9, 2019

Thanks! Looks like it. But the analog stick ui movement is a bug that should be fixed, and not mentioned over there.

@QbieShay
Copy link
Contributor

QbieShay commented Mar 9, 2019

@groud indeed! It was me ahah. But I do believe that the issue he described with only up and right should be addressed, might be a consequence of your new implementation of the axes ( I guess they used to work because they behaved like keys in the past?) Might be worth addressing soon, right after 3.1 maybe?

@groud
Copy link
Member

groud commented Mar 9, 2019

Ah indeed, there are two issues in one here. The positive value is a problem yes, I'll have a look.
Regarding the other problem, it is more or less expected since joystick do not create echo event. As redux suggested that might be an option for actions.
But it can be easily workarounded by manually generating echo events, that why I added the enhancement tag.

@groud groud added the bug label Mar 9, 2019
@groud groud self-assigned this Mar 9, 2019
@groud groud added this to the 3.1 milestone Mar 9, 2019
@QbieShay
Copy link
Contributor

QbieShay commented Mar 9, 2019

@groud I believe this is the issue you were looking for #18500

@QbieShay
Copy link
Contributor

QbieShay commented Mar 9, 2019

@groud maybe the generation of echo events for gamepad should be a setting in project setting (I'd say ON by default ..) As you can see in #18500 it's a matter of the user receiving events as they are from the input system or having an abstraction on top of it. I vote for abstraction + configuration, so that if someone needs the input as-is it is still possible.

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

Successfully merging a pull request may close this issue.

3 participants