correctly position the minimap

This commit is contained in:
in0finite 2020-05-02 22:13:25 +02:00
parent 3d81bd25ca
commit 19b6c25432

View file

@ -210,8 +210,7 @@ namespace SanAndreasUnity.Behaviours
// update position of UI
int worldSize = mapSize * 4;
Vector3 mapPos = - new Vector3(this.FocusPos.x, this.FocusPos.z, 0f) * mapSize / (float)worldSize;
Vector3 mapPos = - new Vector3(this.FocusPos.x, this.FocusPos.z, 0f) * (mapSize / (float)mapEdge);
mapImage.rectTransform.localPosition = mapPos;
// update rotation of UI