Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

godot-demos/2018/09-11-input-actions-remapping lack of gamepad support #68

Open
1 of 2 tasks
TheMikirog opened this issue Oct 4, 2020 · 0 comments
Open
1 of 2 tasks

Comments

@TheMikirog
Copy link

TheMikirog commented Oct 4, 2020

I'm submitting a...

  • Bug report.
  • Feature request.

What is the current behavior?
Using a gamepad to assign buttons / axis crashes the program.

What is the expected behavior?
The program should detect the button press on gamepad and then I should be able to use that button during the game.

Tell us the steps to reproduce the bug, and if possible share a minimal demo of the problem.

  1. Run the program
  2. Bring up the Input mapper with ESC
  3. Select Custom profile
  4. Press any Change button
  5. Press a button / axis on any gamepad
  6. The game crashes

Other information
Errors:
Invalid get index 'scancode' (on base: 'InputEventJoypadButton'). (pressing a button)
Invalid get index 'scancode' (on base: 'InputEventJoypadMotion'). (using an analog stick)

The program expects a keyboard input and assumes that we're passing input events that contain the scancode variable, which doesn't exist on gamepad. Instead, button_index should be used for buttons. Analog sticks however are a bit tricky, because one axis represents both directions, so we need to use both axis and value used.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant