From 5d4367fa3ece24e84a56165e67b57e4d42e60a8d Mon Sep 17 00:00:00 2001 From: in0finite Date: Tue, 28 Apr 2020 23:47:45 +0200 Subject: [PATCH] zooming of minimap works --- Assets/Scripts/Behaviours/MiniMap.cs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Assets/Scripts/Behaviours/MiniMap.cs b/Assets/Scripts/Behaviours/MiniMap.cs index cb7e4287..9f960dfb 100644 --- a/Assets/Scripts/Behaviours/MiniMap.cs +++ b/Assets/Scripts/Behaviours/MiniMap.cs @@ -345,13 +345,6 @@ namespace SanAndreasUnity.Behaviours if (playerController != null && !GameManager.CanPlayerReadInput() && debugActive) return; - float deltaZoom = realZoom - lastZoom; - - //mapContainer.localScale = new Vector3(realZoom, realZoom, 1); - - lastZoom = realZoom; - - //Vector3 defPos = (new Vector3(pPos.x, pPos.z, 0) * (uiSize / -1000f)) / scaleConst; // Why? //if (mapContainer != null) @@ -376,12 +369,16 @@ namespace SanAndreasUnity.Behaviours //mapContainer.pivot = new Vector2(mapPos.x, mapPos.y); mapContainer.localRotation = Quaternion.Euler(0, 0, relAngle); - + + mapContainer.localScale = new Vector3(realZoom, realZoom, 1); + lastZoom = realZoom; + if (northPivot != null) northPivot.localRotation = Quaternion.Euler(0, 0, relAngle); if (playerImage != null && m_ped != null) playerImage.rectTransform.localRotation = Quaternion.Euler(0, 0, relAngle - (m_ped.transform.eulerAngles.y + 180)); + } private IEnumerator ChangeZoom(bool isIncreasing)