Created
February 6, 2023 14:40
-
-
Save daniele-quero/a7ca33eb1544535964bc37efa8aa837b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Image _mapImage; | |
private Vector3 _mapPos = Vector3.zero; | |
private Vector3 _elemPos = Vector3.zero; | |
void Update() | |
{ | |
_mapPos.x = _player.transform.position.x; | |
_mapPos.y = _player.transform.position.z; | |
_mapImage.rectTransform.localPosition = -_mapPos; | |
foreach (var o in _images.Keys) | |
{ | |
_elemPos.x = o.position.x; | |
_elemPos.y = o.position.z; | |
_images[o].localPosition = _elemPos; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment