I cannot read the Oculus VR Controller Joystick axis values

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By KevinC

I have a VR project with a Root Scene, a ARVROrigin node as a child and a ARVRController node as a child of it. The ARVROrigin node and ARVRController node scenes are copied directly from the Oculus VR Pluigin. I can see the controllers in the VR HMD and they move correctly.

In the script for the ARVRController I have printed the following methods to the Output window and they make sense:

  • get_controller_name() [“Right Oculus Touch Controller”]
  • get_joystick_id ( ) [3]

However I cannot get the get_joystick_axis ( axis ) method to return a value when printed to the Output window.

What have I missed?

Have you tried other inputs, e.g. using Input.get_action_strength('some axis'), where 'some axis' is a defined axis for the Oculus joystick?

Ertain | 2021-04-22 23:32

I think the controllers have to have id 1 for left, and id 2 for right. I’m not sure if that’s a requirement, but that’s how I always define them.

Are you sure you have added the scene to the tree?

Those are the only two things I can think of.

stormreaver | 2021-05-02 23:45

Tried this. Ive tried axis 0 through 9, no response.

KevinC | 2021-05-04 21:29

Yes the controller node is a child of an ARVROrigin node which is in turn a child of a #d root scene,

My original assumption (I know assumptions are dangerous) was that since I could read the controller ID and the controller type from script, I should have been able to read the joystick values.

I am trying the OpenVR with some better success.

KevinC | 2021-05-04 21:33

Speaking of assumptions, I am assuming you are on on Oculus Quest, though you only mention that you are on an Oculus. Are you on a Quest?

stormreaver | 2021-05-04 22:40