GodotVR / godot_oculus_mobile

Godot Oculus mobile drivers (Oculus Go / Oculus Quest)
MIT License
169 stars 34 forks source link

Allows retrieval of the Oculus primary controller id #111

Closed m4gr3d closed 4 years ago

m4gr3d commented 4 years ago

For the Oculus Go, the primary controller is always the connected controller since there's a single one. For the Oculus Quest, the primary controller is the one whose buttons (asides from the grab button) were pressed last by the user.

m4gr3d commented 4 years ago

Looks good to me. Do you know if there is some documentation on how the Oculus SDK decides which controller is "the most active"?

Their documentation is slim (search for VRAPI_ACTIVE_INPUT_DEVICE_ID in that file), but from experimentation, it matches the description I've added:

For the Oculus Go, the primary controller is always the connected controller since there's a single one. For the Oculus Quest, the primary controller is the one whose buttons (asides from the grab button) were pressed last by the user.