How do get position of a widget?(BP)

I have a a HUD widget that displays a grid of many square item slots(which have their widget class) . I have object references to everyone of the item slots. I want to put something in the same place of one, I know how to set the position but not get the position. I need to get the item slots object 2D(which has its own widget blueprint and has been placed in the grid of another widget called HUD) position in the viewport.

How do I do this?
I hope the explanation wasn’t too confusing.

I think a little bit of information is missing.

Based on/using what? Also C++ or BP?

I am using BP and when I said “but not get the position” I meant I don’t know how to get the position. All I want to do is get the location/position of anyone of those squares. So all I need is the widgets viewport location which is a 2D Vector(XY coordinates).

So this seems to be more difficult than it should be…

So far everything I’ve tried isn’t giving the correct results. Will continue to investigate.

Edit: I think this is it?

Widget Screen Position posted by anonymous | blueprintUE | PasteBin For Unreal Engine 4

Edit: Nevermind, I thought the viewport position would be the right one. But then I tried pixel position. Thank you for the help.
image

But for anyone who what’s to know what happens when you do viewport position, its down below.


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.