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

Button and axis mapping #4

Open
BastiaanOlij opened this issue Feb 10, 2018 · 2 comments
Open

Button and axis mapping #4

BastiaanOlij opened this issue Feb 10, 2018 · 2 comments

Comments

@BastiaanOlij
Copy link
Member

BastiaanOlij commented Feb 10, 2018

Godot buttons and axis are mapped as follows:
Axis 0 = Left/Right on the joystick
Axis 1 = Forward/Backward on the joystick
Axis 2 = Front trigger
Axis 4 = Side trigger

Button 1 = B / Y pressed
Button 2 = Side trigger pressed
Button 3 = Oculus / Menu pressed
Button 5 = Touch A/X (finger resting but not pressing)
Button 6 = Touch B/Y (finger resting but not pressing)
Button 7 = A / X pressed
Button 9 = Thumb resting
Button 10 = Thumb up
Button 11 = Index finger resting
Button 12 = Index finger pointing
Button 14 = Press down analog stick
Button 15 = Front trigger (on/off version of Axis 2)

I've tried to keep some overlap with the button mapping as how touch controllers are represented in godot_openvr so that you can easily switch between deploying to either OpenVR or Oculus SDK

@BastiaanOlij
Copy link
Member Author

I've added the primary buttons as constants in Godot: godotengine/godot#29754

I'm planning to solve the finger presence values in a different way once I get a play with Knuckles controllers. As both have similar functionality need to look at how we want to make that work generically in Godot.

@BastiaanOlij
Copy link
Member Author

The aforementioned PR has been merged upstream :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant