I have made a UMG to follow a moving enemy(healthbar), the problem is when I(the player) move, the UMG moves along with me. It’s like it struggles to keep its screen location over the enemy. Any ideas how to fix that? I’m using a loop I made to call SetPositionInViewport. I tried to remove the UMG’s canvas panel, but that didn’t help. Any help would be highly appreciated.
This was actually the first method I used to realise the healthbar, but I had to make it always face the player and it got a nasty rotating effect. Isn’t there a way to fix the problem without creating a widget component?