But unfortunately it’s pretty useless since it returns the absolute absolute position, the position in Windows (or whatever Operating System). So it only works fine if the game runs in fullscreen.
The Node itself says “Absolute coordinates could be either desktop or window space depending on what space the root of the widget hierarchy is in.”.
How can I define in which space the root of the widget hierarchy is in? If I can’t, is there any other easy way to convert local (relative to parent) positions to absolute (relative to viewport) positions in UMG? At the moment I am converting this manually, but this only works fine if I know where the anchor points are set, and I would like to have a solution independent from anchor point positions.
For anyone who wants an example of how this should work, here is what I did.
I wanted to set the mouse position a little to the left of a button that is being used to select an option during a dialogue sequence.
The mouse only appears when a dialogue button is created, so setting the mouse position to be close (but not overlapping the button) was something that felt nice to implement.
First I stored the widget’s geometry on tick like this: