diff --git a/XRTK-Core/Packages/com.xrtk.core/Definitions/Devices/SupportedControllerType.cs b/XRTK-Core/Packages/com.xrtk.core/Definitions/Devices/SupportedControllerType.cs index a940a6343..838ec73db 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Definitions/Devices/SupportedControllerType.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Definitions/Devices/SupportedControllerType.cs @@ -21,7 +21,6 @@ public enum SupportedControllerType TouchScreen, Mouse, Lumin, - OculusGo, - OculusQuest + OculusGo } } diff --git a/XRTK-Core/Packages/com.xrtk.core/Providers/Controllers/OpenVR/OculusTouchOpenVRController.cs b/XRTK-Core/Packages/com.xrtk.core/Providers/Controllers/OpenVR/OculusTouchOpenVRController.cs index 200f127a7..f9e1eb72e 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Providers/Controllers/OpenVR/OculusTouchOpenVRController.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Providers/Controllers/OpenVR/OculusTouchOpenVRController.cs @@ -31,12 +31,12 @@ public OculusTouchOpenVRController(TrackingState trackingState, Handedness contr new MixedRealityInteractionMapping(1, "Axis1D.PrimaryIndexTrigger", AxisType.SingleAxis, DeviceInputType.Trigger, ControllerMappingLibrary.AXIS_9), new MixedRealityInteractionMapping(2, "Axis1D.PrimaryIndexTrigger Touch", AxisType.Digital, DeviceInputType.TriggerTouch, KeyCode.JoystickButton14), new MixedRealityInteractionMapping(3, "Axis1D.PrimaryIndexTrigger Near Touch", AxisType.Digital, DeviceInputType.TriggerNearTouch, ControllerMappingLibrary.AXIS_13), - new MixedRealityInteractionMapping(4, "Axis1D.PrimaryIndexTrigger Press", AxisType.Digital, DeviceInputType.TriggerPress, ControllerMappingLibrary.AXIS_9), + new MixedRealityInteractionMapping(4, "Axis1D.PrimaryIndexTrigger Press", AxisType.Digital, DeviceInputType.TriggerPress, KeyCode.JoystickButton14), new MixedRealityInteractionMapping(5, "Axis1D.PrimaryHandTrigger Press", AxisType.SingleAxis, DeviceInputType.Trigger, ControllerMappingLibrary.AXIS_11), new MixedRealityInteractionMapping(6, "Axis2D.PrimaryThumbstick", AxisType.DualAxis, DeviceInputType.ThumbStick, ControllerMappingLibrary.AXIS_1, ControllerMappingLibrary.AXIS_2), new MixedRealityInteractionMapping(7, "Button.PrimaryThumbstick Touch", AxisType.Digital, DeviceInputType.ThumbStickTouch, KeyCode.JoystickButton16), new MixedRealityInteractionMapping(8, "Button.PrimaryThumbstick Near Touch", AxisType.Digital, DeviceInputType.ThumbNearTouch, ControllerMappingLibrary.AXIS_15), - new MixedRealityInteractionMapping(9, "Button.PrimaryThumbstick Press", AxisType.Digital, DeviceInputType.ThumbStickPress, KeyCode.JoystickButton8), + new MixedRealityInteractionMapping(9, "Button.PrimaryThumbstick Press", AxisType.Digital, DeviceInputType.ThumbStickPress, KeyCode.JoystickButton16), new MixedRealityInteractionMapping(10, "Button.Three Press", AxisType.Digital, DeviceInputType.ButtonPress, KeyCode.JoystickButton2), new MixedRealityInteractionMapping(11, "Button.Four Press", AxisType.Digital, DeviceInputType.ButtonPress, KeyCode.JoystickButton3), new MixedRealityInteractionMapping(12, "Button.Start Press", AxisType.Digital, DeviceInputType.ButtonPress, KeyCode.JoystickButton7), @@ -53,12 +53,12 @@ public OculusTouchOpenVRController(TrackingState trackingState, Handedness contr new MixedRealityInteractionMapping(1, "Axis1D.SecondaryIndexTrigger", AxisType.SingleAxis, DeviceInputType.Trigger, ControllerMappingLibrary.AXIS_10), new MixedRealityInteractionMapping(2, "Axis1D.SecondaryIndexTrigger Touch", AxisType.Digital, DeviceInputType.TriggerTouch, KeyCode.JoystickButton15), new MixedRealityInteractionMapping(3, "Axis1D.SecondaryIndexTrigger Near Touch", AxisType.Digital, DeviceInputType.TriggerNearTouch, ControllerMappingLibrary.AXIS_14), - new MixedRealityInteractionMapping(4, "Axis1D.SecondaryIndexTrigger Press", AxisType.Digital, DeviceInputType.TriggerPress, ControllerMappingLibrary.AXIS_10), + new MixedRealityInteractionMapping(4, "Axis1D.SecondaryIndexTrigger Press", AxisType.Digital, DeviceInputType.TriggerPress, KeyCode.JoystickButton15), new MixedRealityInteractionMapping(5, "Axis1D.SecondaryHandTrigger Press", AxisType.SingleAxis, DeviceInputType.Trigger, ControllerMappingLibrary.AXIS_12), new MixedRealityInteractionMapping(6, "Axis2D.SecondaryThumbstick", AxisType.DualAxis, DeviceInputType.ThumbStick, ControllerMappingLibrary.AXIS_4, ControllerMappingLibrary.AXIS_5), new MixedRealityInteractionMapping(7, "Button.SecondaryThumbstick Touch", AxisType.Digital, DeviceInputType.ThumbStickTouch, KeyCode.JoystickButton17), new MixedRealityInteractionMapping(8, "Button.SecondaryThumbstick Near Touch", AxisType.Digital, DeviceInputType.ThumbNearTouch, ControllerMappingLibrary.AXIS_16), - new MixedRealityInteractionMapping(9, "Button.SecondaryThumbstick Press", AxisType.Digital, DeviceInputType.ThumbStickPress, KeyCode.JoystickButton9), + new MixedRealityInteractionMapping(9, "Button.SecondaryThumbstick Press", AxisType.Digital, DeviceInputType.ThumbStickPress, KeyCode.JoystickButton17), new MixedRealityInteractionMapping(10, "Button.One Press", AxisType.Digital, DeviceInputType.ButtonPress, KeyCode.JoystickButton0), new MixedRealityInteractionMapping(11, "Button.Two Press", AxisType.Digital, DeviceInputType.ButtonPress, KeyCode.JoystickButton1), new MixedRealityInteractionMapping(12, "Button.One Touch", AxisType.Digital, DeviceInputType.ButtonPress, KeyCode.JoystickButton10), diff --git a/XRTK-Core/Packages/com.xrtk.core/Providers/Controllers/OpenVR/OpenVRDataProvider.cs b/XRTK-Core/Packages/com.xrtk.core/Providers/Controllers/OpenVR/OpenVRDataProvider.cs index 81450334f..d8cf03c15 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Providers/Controllers/OpenVR/OpenVRDataProvider.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Providers/Controllers/OpenVR/OpenVRDataProvider.cs @@ -121,7 +121,7 @@ protected override SupportedControllerType GetCurrentControllerType(string joyst return SupportedControllerType.None; } - if (joystickName.Contains("Oculus Rift CV1")) + if (joystickName.Contains("Oculus Rift CV1") || joystickName.Contains("Oculus Touch")) { return SupportedControllerType.OculusTouch; } diff --git a/XRTK-Core/Packages/com.xrtk.core/Providers/Controllers/UnityInput/GenericJoystickController.cs b/XRTK-Core/Packages/com.xrtk.core/Providers/Controllers/UnityInput/GenericJoystickController.cs index 55d951a64..4dd507954 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Providers/Controllers/UnityInput/GenericJoystickController.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Providers/Controllers/UnityInput/GenericJoystickController.cs @@ -176,6 +176,7 @@ protected void UpdateSingleAxisData(MixedRealityInteractionMapping interactionMa // If our value was updated, raise it. if (interactionMapping.Updated) { + Debug.LogError($"Interaction updated {interactionMapping.Description} - Value [{interactionMapping.FloatData}]"); MixedRealityToolkit.InputSystem?.RaiseOnInputPressed(InputSource, ControllerHandedness, interactionMapping.MixedRealityInputAction, singleAxisValue); } }