|
@@ -27,17 +27,23 @@ public class ViveInput : MonoBehaviour
|
|
|
{
|
|
|
if (grabPinch.GetStateDown(SteamVR_Input_Sources.Any))
|
|
|
{
|
|
|
- Debug.Log("Recording...");
|
|
|
- isRecording = true;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
if (teleport.GetStateDown(SteamVR_Input_Sources.Any))
|
|
|
{
|
|
|
- Debug.Log("Saving...");
|
|
|
- isRecording = false;
|
|
|
- recordingTime = 0;
|
|
|
- playerReplay.Save();
|
|
|
- playerReplay.ResetRecording();
|
|
|
+ if (!isRecording)
|
|
|
+ {
|
|
|
+ Debug.Log("Recording...");
|
|
|
+ isRecording = true;
|
|
|
+ } else
|
|
|
+ {
|
|
|
+ Debug.Log("Saving...");
|
|
|
+ isRecording = false;
|
|
|
+ recordingTime = 0;
|
|
|
+ playerReplay.Save();
|
|
|
+ playerReplay.ResetRecording();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (grabGrib.GetStateDown(SteamVR_Input_Sources.Any))
|