Browse Source

Update ViveInput.cs

Kenkart 2 years ago
parent
commit
85c60649a5
1 changed files with 7 additions and 7 deletions
  1. 7 7
      Assets/Scripts/ViveInput.cs

+ 7 - 7
Assets/Scripts/ViveInput.cs

@@ -28,9 +28,12 @@ public class ViveInput : MonoBehaviour
 
     void Update()
     {
-        if (grabPinch.GetStateDown(SteamVR_Input_Sources.Any))
+        if (grabPinch.GetStateDown(SteamVR_Input_Sources.Any) && !isPlaying)
         {
-
+            Debug.Log("Loading...");
+            csvTime = 0;
+            isPlaying = true;
+            playerReplay.Load();
         }
 
         if (teleport.GetStateDown(SteamVR_Input_Sources.Any))
@@ -50,12 +53,9 @@ public class ViveInput : MonoBehaviour
             }
         }
 
-        if (grabGrib.GetStateDown(SteamVR_Input_Sources.Any) && !isPlaying)
+        if (grabGrib.GetStateDown(SteamVR_Input_Sources.Any))
         {
-            Debug.Log("Loading...");
-            csvTime = 0;
-            isPlaying = true;
-            playerReplay.Load();
+            
         }
 
         if (isRecording)