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 code is pretty simple, in FixedUpdate:
healthBar.transform.position = Camera.main.WorldToScreenPoint(target.position)
Thanks in advance!