pjchardt Posted March 10, 2021 Share Posted March 10, 2021 ViveInput.GetAxis(HandRole.rightHand, ControllerAxis.JoystickX) works as expected on Index and Rift. However, on Quest running on OpenVR through Oculus Link the values are always 0. I looked into a work around solution by checking the deviceModel, but that is returning unknown for Quest controllers. Unity 2020.2.7f1 VIU 1.12.2 Link to comment Share on other sites More sharing options...
chengnay Posted March 11, 2021 Share Posted March 11, 2021 @pjchardt Could you list the versions for Unity XR Plugin(Oculus XR Plugin?) that you installed in your project? Did you import any SDK(Oculus Integration)? Link to comment Share on other sites More sharing options...
pjchardt Posted March 11, 2021 Author Share Posted March 11, 2021 @chengnay XR Plugin Manager 4.0.1 Oculus XR Plugin 1.8.1 OpenVR XR Plugin 1.1.4 Oculus Integration 25.0 In XR Plugin Management I do not have Oculus Loader checked, but do have OpenVR loaded checked. I don't want Oculus checked as then I can't access the Steam Overlay through the menu buttons. Thanks, Link to comment Share on other sites More sharing options...
chengnay Posted March 12, 2021 Share Posted March 12, 2021 @pjchardt Could you import SteamVR Unity Plugin to your project and try again? You cannot only use OpenVR XR Plugin alone without importing SteamVR Unity Plugin. Link to comment Share on other sites More sharing options...
pjchardt Posted March 12, 2021 Author Share Posted March 12, 2021 @chengnayI have SteamVR Unity Plugin installed -> SteamVR Unity Plugin - v2.7.3 (sdk 1.14.15) ...Sorry I forgot to include in my last reply. Rift joysticks have correct values. Just not Quest controllers when running through Oculus Link. Additionally, when I query the device model, I get "unknown" for the controllers. VRModule.GetDeviceState(ViveRole.GetDeviceIndexEx(m_handRole)).deviceModel; Link to comment Share on other sites More sharing options...
pjchardt Posted March 13, 2021 Author Share Posted March 13, 2021 I looked into things a bit further. When I enable the Oculus Plugin in XR Plugin Management, I do get the device names. However, I can no longer open the SteamVR overlay using the menu button. I am guessing this is because it finds and loads the Oculus Plugin first, is this correct? That in this case it is not running SteamVR? When not enabling Oculus Plugin and just enabling OpenVR, I get device names for Touch controllers (when testing on the rift), but not Quest controllers (when testing on Quest using Oculus Link). This is a problem for joystick input, as joystick input is not working, and I can't hack a temporary workaround because the game doesn't know it is using a Quest controller at runtime (query returns "unknown"). This is also an issue for applying correct controller offsets...at least I have not found a good solution to account for controller offsets on SteamVR other than by looking at device name, which I cannot do for Quest. Link to comment Share on other sites More sharing options...
chengnay Posted March 14, 2021 Share Posted March 14, 2021 @pjchardt I found the root cause and solution. In Assets\HTC.UnityPlugin\VRModule\VRModuleBase.cs, line 32, private static readonly Regex s_oculusRgx = new Regex("^.*(oculus|quest).*$", RegexOptions.IgnoreCase); Previously, we did not test this scenario and didn't know the name will not have oculus included. The output of the model name is "Quest (Right Controller)". Please let me know if you still have issues. Link to comment Share on other sites More sharing options...
pjchardt Posted March 15, 2021 Author Share Posted March 15, 2021 @chengnayThanks! Tested and can confirm it fixes the Joystick issue and the unknown device model issue. However, I am not getting Quest (Right Controller) though, instead I get deviceModel name = OculusTouchRight interestingly though, renderModelName = oculus_quest_controller_right Link to comment Share on other sites More sharing options...
chengnay Posted March 16, 2021 Share Posted March 16, 2021 @pjchardt What is your Oculus App version(Settings>General>at the bottom of the list) that installed on your PC? And also the SteamVR version? My version is Oculus App version 26.1.0.41.502 and SteamVR version is 1.16.10. Could you also try to print out the information of the device? Thanks! In Assets\HTC.UnityPlugin\VRModule\Modules\SteamVRv2Module.cs, line 564, Debug.Log("deviceClass: " + currState.deviceClass); Debug.Log("serialNumber: " + currState.serialNumber); Debug.Log("modelNumber: " + currState.modelNumber); Debug.Log("renderModelName: " + currState.renderModelName); SetupKnownDeviceModel(currState); Link to comment Share on other sites More sharing options...
pjchardt Posted March 16, 2021 Author Share Posted March 16, 2021 @chengnayOculus App Version 26.1.0.41.502 (26.1.0.41.502) SteamVR 1.16.8 deviceClass: Controller serialNumber: 1PASH9A55N9485_Controller_Right modelNumber: Quest (Right Controller) renderModelName: oculus_quest_controller_right Line 235 in VRModuleBase.cs is hit in the switch statement when assigning device. deviceState.deviceModel = VRModuleDeviceModel.OculusTouchRight; Looks like the logic assumes either Touch or Rift S? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now