Skip to content

Support gamepad input #175

@fenomas

Description

@fenomas

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions