From 14937d96b9856e5b3d138955f03e8452322f769a Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Wed, 23 Feb 2022 09:41:39 +0100 Subject: [PATCH] Fix triggers/option/touchpad input with UnityXR enabled but not tracking --- .../Scripts/Extensions/UnityXR/UnityXRHand.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Runtime/HumanoidFree/Scripts/Extensions/UnityXR/UnityXRHand.cs b/Runtime/HumanoidFree/Scripts/Extensions/UnityXR/UnityXRHand.cs index 06fb91b..7671fd9 100644 --- a/Runtime/HumanoidFree/Scripts/Extensions/UnityXR/UnityXRHand.cs +++ b/Runtime/HumanoidFree/Scripts/Extensions/UnityXR/UnityXRHand.cs @@ -140,17 +140,17 @@ namespace Passer.Humanoid { controllerInputSide.stickButton |= (controller.primaryAxis.z > 0.5F); controllerInputSide.stickTouch |= (controller.primaryAxis.z > -0.5F); - controllerInputSide.touchpadHorizontal = controller.secondaryAxis.x; - controllerInputSide.touchpadVertical = controller.secondaryAxis.y; + controllerInputSide.touchpadHorizontal += controller.secondaryAxis.x; + controllerInputSide.touchpadVertical += controller.secondaryAxis.y; controllerInputSide.touchpadPress |= (controller.secondaryAxis.z > 0.5F); controllerInputSide.touchpadTouch |= (controller.secondaryAxis.z > -0.5F); controllerInputSide.buttons[0] |= (controller.button1 > 0.5F); controllerInputSide.buttons[1] |= (controller.button2 > 0.5F); - controllerInputSide.trigger1 = controller.trigger1; - controllerInputSide.trigger2 = controller.trigger2; - controllerInputSide.option = controller.option > 0; + controllerInputSide.trigger1 += controller.trigger1; + controllerInputSide.trigger2 += controller.trigger2; + controllerInputSide.option |= controller.option > 0; } // arm model for 3DOF tracking: position is calculated from rotation