From bd6d8b46b8a314edf957e1fa28f69477e698f309 Mon Sep 17 00:00:00 2001 From: Dabble Date: Thu, 22 Feb 2018 01:44:36 +0100 Subject: [PATCH] Harder to accidentally load level from menu ...by requiring the player to squeeze the trigger slightly more, to avoid loading a level by barely grazing the trigger. --- Assets/Scripts/SelectLevel.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/SelectLevel.cs b/Assets/Scripts/SelectLevel.cs index 34b15404..d22fc1af 100644 --- a/Assets/Scripts/SelectLevel.cs +++ b/Assets/Scripts/SelectLevel.cs @@ -1,5 +1,6 @@ using UnityEngine; using UnityEngine.SceneManagement; +using Valve.VR; using Valve.VR.InteractionSystem; [RequireComponent(typeof(Interactable))] @@ -20,7 +21,7 @@ void OnHandHoverBegin(Hand hand) void HandHoverUpdate(Hand hand) { - if (hand.GetStandardInteractionButton()) + if (hand.controller.GetPressDown(EVRButtonId.k_EButton_SteamVR_Trigger)) { if (!isLoadingLevel) {