GodotVR / godot_oculus

Oculus drivers for Godot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Button and axis mapping

BastiaanOlij opened this issue · comments

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

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.

The aforementioned PR has been merged upstream :)