Hi guys!
I started making Health Bars above enemies in my game made in Unity.
But for some reason, if I’m moving, it’s offsetted in that direction.
The health bar is on an Overlay canvas, and contains basic images.
The parent:
The code is pretty simple, in FixedUpdate:
healthBar.transform.position = Camera.main.WorldToScreenPoint(target.position)
GIF: https://i.imgur.com/K8mwzTW.mp4
Any ideas?
Thanks in advance!