From 748902df7d6c8adf3cc19e687b3a956cc5d76428 Mon Sep 17 00:00:00 2001 From: "Theston E. Fox" Date: Sun, 1 Jan 2017 20:16:02 +0000 Subject: [PATCH] fix(SDK): prevent SteamVR SDK reporting a button two press Previously, the SteamVR SDK would report the Application Menu button press as being ButtonOne and ButtonTwo. This is sematically incorrect as the Vive controller does not have a button two and therefore requesting if button two has been pressed should always return false. --- Assets/VRTK/SDK/SteamVR/SDK_SteamVRController.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Assets/VRTK/SDK/SteamVR/SDK_SteamVRController.cs b/Assets/VRTK/SDK/SteamVR/SDK_SteamVRController.cs index 478923162..5bf4d21aa 100644 --- a/Assets/VRTK/SDK/SteamVR/SDK_SteamVRController.cs +++ b/Assets/VRTK/SDK/SteamVR/SDK_SteamVRController.cs @@ -673,7 +673,7 @@ public override bool IsButtonOneTouchedUpOnIndex(uint index) /// Returns true if the button is continually being pressed. public override bool IsButtonTwoPressedOnIndex(uint index) { - return IsButtonPressed(index, ButtonPressTypes.Press, SteamVR_Controller.ButtonMask.ApplicationMenu); + return false; } /// @@ -683,7 +683,7 @@ public override bool IsButtonTwoPressedOnIndex(uint index) /// Returns true if the button has just been pressed down. public override bool IsButtonTwoPressedDownOnIndex(uint index) { - return IsButtonPressed(index, ButtonPressTypes.PressDown, SteamVR_Controller.ButtonMask.ApplicationMenu); + return false; } /// @@ -693,7 +693,7 @@ public override bool IsButtonTwoPressedDownOnIndex(uint index) /// Returns true if the button has just been released. public override bool IsButtonTwoPressedUpOnIndex(uint index) { - return IsButtonPressed(index, ButtonPressTypes.PressUp, SteamVR_Controller.ButtonMask.ApplicationMenu); + return false; } /// @@ -713,7 +713,7 @@ public override bool IsButtonTwoTouchedOnIndex(uint index) /// Returns true if the button has just been touched down. public override bool IsButtonTwoTouchedDownOnIndex(uint index) { - return IsButtonPressed(index, ButtonPressTypes.TouchDown, SteamVR_Controller.ButtonMask.ApplicationMenu); + return false; } /// @@ -723,7 +723,7 @@ public override bool IsButtonTwoTouchedDownOnIndex(uint index) /// Returns true if the button has just been released. public override bool IsButtonTwoTouchedUpOnIndex(uint index) { - return IsButtonPressed(index, ButtonPressTypes.TouchUp, SteamVR_Controller.ButtonMask.ApplicationMenu); + return false; } [RuntimeInitializeOnLoadMethod]