# Local to absolute Position in UMG

**URL:** <https://forums.unrealengine.com/t/local-to-absolute-position-in-umg/313682>\
**Category:** UI\
**Tags:** position, viewport, unreal-engine, UE4, question, UMG\
**Created:** [April 3, 2015, 4:15pm UTC](https://forums.unrealengine.com/t/local-to-absolute-position-in-umg/313682 "2015-04-03T16:15:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Alcatraz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@John\_Alcatraz](https://forums.unrealengine.com/u/John_Alcatraz)\
**Post date:** [April 3, 2015, 4:15pm UTC](https://forums.unrealengine.com/t/local-to-absolute-position-in-umg/313682/1 "2015-04-03T16:15:47Z")

</div>

Hey, there is this nice little Node in UMG:

[https://forums.unrealengine.com/attachment.php?attachmentid=33348&d=1428032141](https://forums.unrealengine.com/attachment.php?attachmentid=33348&d=1428032141)

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.

---

<div class="post-metadata">

**Author:** ![Foxe-92](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Foxe-92](https://forums.unrealengine.com/u/Foxe-92)\
**Post date:** [August 31, 2015, 10:22pm UTC](https://forums.unrealengine.com/t/local-to-absolute-position-in-umg/313682/2 "2015-08-31T22:22:07Z")

</div>

Any news on this? I have the same problem; I need to be able to get a widget’s position in the viewport.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_da7553e4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_da7553e4](https://forums.unrealengine.com/u/anonymous_user_da7553e4)\
**Post date:** [February 29, 2016, 9:25pm UTC](https://forums.unrealengine.com/t/local-to-absolute-position-in-umg/313682/3 "2016-02-29T21:25:10Z")

</div>

Bump, looking for this information as well.

---

<div class="post-metadata">

**Author:** ![John\_Alcatraz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@John\_Alcatraz](https://forums.unrealengine.com/u/John_Alcatraz)\
**Post date:** [March 10, 2016, 5:06am UTC](https://forums.unrealengine.com/t/local-to-absolute-position-in-umg/313682/4 "2016-03-10T05:06:05Z")

</div>

Solution:

There is a node “Local to Viewport” now. It was added in 4.10 I think.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_da7553e4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_da7553e4](https://forums.unrealengine.com/u/anonymous_user_da7553e4)\
**Post date:** [May 10, 2016, 8:05pm UTC](https://forums.unrealengine.com/t/local-to-absolute-position-in-umg/313682/5 "2016-05-10T20:05:09Z")

</div>

That node takes a FGeometry argument. Where does that come from?

---

<div class="post-metadata">

**Author:** ![plojnitza](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@plojnitza](https://forums.unrealengine.com/u/plojnitza)\
**Post date:** [November 1, 2016, 1:29pm UTC](https://forums.unrealengine.com/t/local-to-absolute-position-in-umg/313682/6 "2016-11-01T13:29:16Z")

</div>

Some methods have the FGeometry fed by the engine. Ex: Tick, OnMouseMove, etc.

---

<div class="post-metadata">

**Author:** ![CometGoat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CometGoat](https://forums.unrealengine.com/u/CometGoat)\
**Post date:** [March 17, 2021, 2:08pm UTC](https://forums.unrealengine.com/t/local-to-absolute-position-in-umg/313682/7 "2021-03-17T14:08:02Z")

</div>

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:

 ![332777-storewidgetgeometry.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/0/f/e0fca8f0baf7fb9ab0ab6314ba759fe94c4fc59f.png)

Next, I set the position of the mouse by offsetting the position I got from the top left position of the widget:

 ![332778-setmousepositionnexttowidget.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/7/1/571943950ff01d8a150ca9638174908216d090be.png)

That should be a little bit more info to help others like myself get started.
