Hi I’m using 2019.4.18 with the SteamVR plugin and Oculus. I have Oculus working with the XR framework and UI interactions, buttons, clicking works.
SteamVR I recognize I have to add “actions” to get it to work with the UI.
I have a script that gets references to the actions like this:
private Valve.VR.SteamVR_Action_Boolean triggerAction = Valve.VR.SteamVR_Input.GetAction<Valve.VR.SteamVR_Action_Boolean>("Trigger");
private Valve.VR.SteamVR_Action_Boolean gripAction = Valve.VR.SteamVR_Input.GetAction<Valve.VR.SteamVR_Action_Boolean>("Grip");
private Valve.VR.SteamVR_Action_Boolean menuAction = Valve.VR.SteamVR_Input.GetAction<Valve.VR.SteamVR_Action_Boolean>("Menu");
private Valve.VR.SteamVR_Action_Vector2 axis2dAction = Valve.VR.SteamVR_Input.GetAction<Valve.VR.SteamVR_Action_Vector2>("Axis2D");
And I try to grab the state of the action in Update:
bool state = triggerAction.GetState(Valve.VR.SteamVR_Input_Sources.RightHand);
but state is always false.
I have an action set activated with the “Trigger” action. This used to work, but has broken by some update. I have to enable both the Legacy and New input systems in the Player settings otherwise I get that infuriating dialog when 2019 starts.
Any ideas why the boolean “state” variable is always false?