From ac163fa2dca36f6687dd5f356dae74463b1ea46e Mon Sep 17 00:00:00 2001 From: Jenny Crowe Date: Wed, 23 Feb 2022 20:17:53 -0700 Subject: [PATCH] Camera now always resets on game switch, even when scrubbing. --- Assets/Scripts/GameManager.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index 95a4e584f..3244b63e0 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -303,7 +303,6 @@ namespace RhythmHeavenMania this.GetComponent().enabled = true; SetGame(game); - GameCamera.transform.localPosition = new Vector3(GameCamera.transform.localPosition.x, GameCamera.transform.localPosition.y, -10); yield return new WaitForSeconds(0.1f); @@ -347,6 +346,8 @@ namespace RhythmHeavenMania }*/ SetCurrentGame(game); + + ResetCamera(); } private void PreloadGame(string game) @@ -407,5 +408,10 @@ namespace RhythmHeavenMania else return true; } + + public void ResetCamera() + { + GameCamera.transform.localPosition = new Vector3(0, 0, -10); + } } } \ No newline at end of file