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

Updated gamepad input reading #379

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Arman-AIi
Copy link

Changes:

  • Decluttered
  • Prints button true/false values AND analog stick horizontal and vertical values (-1 to 1)
    Requests:
  • Make buttons bindable in the keybinds
  • Set default buttons
  • Use left stick for movement and movement angle (like how the left joystick on mobile turns you in the direction you're moving)
  • Use right stick for aiming WITH the aim line (again, like mobile) but NOT for shooting (this will use a different button)

Notes:
Do NOT use GamepadEvent to detect inputs for binding, the gamepad buttons are not events, only values. Only gamepad connection and disconnection is part of GamepadEvent
gamepadLeftStickHorizontal, gamepadLeftStickVertical, and their right stick counterparts are each 2 different values, combine them into a radian value using Math.Atan2 to use for movement angle and aim angle respectively

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

Successfully merging this pull request may close these issues.

1 participant