feat(input): Allow movement / menu nav with dpad and joystick #991
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 themovement_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