From ec9b250189bfd77a7543b1f02e4271e81b18954d Mon Sep 17 00:00:00 2001 From: "William G. Tresselt" <williagt@stud.ntnu.no> Date: Sat, 12 Nov 2022 14:22:09 +0100 Subject: [PATCH] Made key stop spinning when game paused --- ChromeEnigma/Assets/Scripts/Key.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChromeEnigma/Assets/Scripts/Key.cs b/ChromeEnigma/Assets/Scripts/Key.cs index 9e5bc85..7274b85 100644 --- a/ChromeEnigma/Assets/Scripts/Key.cs +++ b/ChromeEnigma/Assets/Scripts/Key.cs @@ -15,7 +15,7 @@ public class Key : MonoBehaviour // Update is called once per frame void Update() { - transform.Rotate(0, 0.25f, 0, Space.World); //Rotate controller, or key, around itself on an angle + if(Time.timeScale > 0) transform.Rotate(0, 0.25f, 0, Space.World); //Rotate controller, or key, around itself on an angle } private void OnTriggerEnter(Collider other) -- GitLab