瀏覽代碼

Update ViveInput.cs

Kenkart 2 年之前
父節點
當前提交
85c60649a5
共有 1 個文件被更改,包括 7 次插入7 次删除
  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)