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

Support gamepad input #175

Open
6 tasks
fenomas opened this issue Mar 3, 2022 · 0 comments
Open
6 tasks

Support gamepad input #175

fenomas opened this issue Mar 3, 2022 · 0 comments

Comments

@fenomas
Copy link
Owner

fenomas commented Mar 3, 2022

The engine should (by default) know how to accept inputs from gamepads. Steps for this:

  • game-inputs needs to learn how to catch gamepad buttons/axis inputs, and emit events similarly to key/mouse events
  • lib/inputs should add default bindings for gamepad keys/axes
  • comps/receivesInputs comp should be able to set moveState.running to a fractional value if left-stick axis inputs are present
  • comps/movement should change so that running is a 0..1 float instead of a boolean (and probably rename it)
  • comps/movement should set the push vector based on the size of the running prop
  • Add bindings to the demo apps for the feature demo inputs (currently bound to 1/2/3 keys)

Analog button press inputs should probably left out for now, as it would require lower-level changes..

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

No branches or pull requests

1 participant