I have following widget. I am getting a instance of a enemy and I would like to move the portion of the umg to the position of the enemy in the world but to screen space.
Unfortunately, I cant seem to align it. I have tried dividing by screenwidth/2 and everything but it always is off and weirdly positioned. I also cannot make sense whne moving it around the canvas. It says 1280x720 but if I move the debug box actually to that location in the widget, its way out of the canvas zone too.
and this is the result (note that the capsule is supposed to be the enemy where it should overlay):
(i am using set render translation to move the entire group)
Would be cool to know how one could align individual elements within a widget, this should ideally be moved between enemies and would be great if i can reuse one and move it but I guess trying out the widgets in the bps is an option too.
Would need refactoring on my end tho
hi there, your solution works in my end. It seems the main issue was that I had set the anchor in the middle of the screen. Once I had put the anchor to the top left it works. I am wondering though what calculations I would need to do to get the correct position once I put an anchor anywhere. Set the difference of the positions?
Anyway, thank you for your help Arjun!