[4.7] UMG Get position on widget

Hi everyone,

So what I’m doing is dynamically creating widgets for my party members. Is there a way to get an existing(parent) widget variable and find it’s current position within the viewport so I can add other widgets(child) based off of the parent’s widget?

If I have to, I can do it based off of the current party member’s index and do it that way, but I would think the above would be easier to work with. But I could be wrong in that manner and if both of them exist, then the performance of one vs the other.

Thanks for your help!

Hi,

You can get the position of a widget by doing this :

48904-2015-07-03+07_54_15-46.126.130.142+-+remote+desktop+connection.png

It will get you the offsets compared to the anchors :

I hope it helps !

Awesome. Exactly what I needed. Thank you very much.

You’ll also have to deal with the screen size, scale and anchor offsets…
(note that this only works with canvas slots)

Any way to do this with horizontal box slots?