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

feat(input): Allow movement / menu nav with dpad and joystick #991

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

MaxCWhitehead
Copy link
Collaborator

This adds movement_alt control bindings that default to dpad on gamepad and None on keyboard mappings.

This allows the dpad or joystick to be used to move player and navigate menu. We may not want this if we choose to use dpad for other stuff later, but for now I think this is nice as it avoids player having to remap gamepad controls to use dpad. Menu navigation on joystick is rough as have to flick the joystick repeatedly, dpad is a better experience for me / this came up in feedback too.

Added a helper func to merge both the joystick and dpad input - the movement binding (joystick) is preferred, but if no input it then takes the movement_alt (dpad).

Had a rough time testing this as can't get xbox pro controller 2 to work (probably macOS issue as it's got bad driver support), or gilrs issue. And my PS5 controller crashes (is a gilrs issue) lol. but I tested on steamdeck and this seems to work as intended.

@zicklag @erlend-sh let me know if any concerns with this

Copy link
Member

@zicklag zicklag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. 👍 I ran into this issue with Dpads earlier, too. I think just adding an alternate controls is a good solution.

@MaxCWhitehead MaxCWhitehead added this pull request to the merge queue Apr 25, 2024
Merged via the queue into fishfolk:main with commit 07004c0 Apr 25, 2024
8 checks passed
@MaxCWhitehead MaxCWhitehead deleted the dpad branch April 25, 2024 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants