noa icon indicating copy to clipboard operation
noa copied to clipboard

Support gamepad input

Open fenomas opened this issue 2 years ago • 0 comments

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..

fenomas avatar Mar 03 '22 04:03 fenomas