# Constrain UMG widget inside player screen

**URL:** <https://forums.unrealengine.com/t/constrain-umg-widget-inside-player-screen/352147>\
**Category:** Community & Industry Discussion\
**Tags:** position, viewport, unreal-engine, screen, question, UMG\
**Created:** [March 29, 2016, 2:05pm UTC](https://forums.unrealengine.com/t/constrain-umg-widget-inside-player-screen/352147 "2016-03-29T14:05:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ClaudioPiccinni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ClaudioPiccinni](https://forums.unrealengine.com/u/ClaudioPiccinni)\
**Post date:** [March 29, 2016, 2:05pm UTC](https://forums.unrealengine.com/t/constrain-umg-widget-inside-player-screen/352147/1 "2016-03-29T14:05:27Z")

</div>

Hi all,  
I’ve been messing around with UMG trying to create a menu that pops next to the mouse location. I got it to work almost like intended using ‘Get Mouse Position’ and ‘Set Position In Viewport’ nodes.  
What I’m not being able to do is finding a way to keep the widget inside the player screen when you click for example in the lower, or right, portion of the screen. The picture shows what I mean, the current behavior (1) and the desired (2).  
I don’t know if there are any built-in settings/nodes to do it, maybe playing with anchors?  
Any help is much appreciated.  
Thanks.

![84236-untitled.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/1/e/61e72db17e797c4f0457d1befe48c0765d0137bf.png)

---

<div class="post-metadata">

**Author:** ![Freezerain](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Freezerain](https://forums.unrealengine.com/u/Freezerain)\
**Post date:** [March 15, 2017, 1:15pm UTC](https://forums.unrealengine.com/t/constrain-umg-widget-inside-player-screen/352147/2 "2017-03-15T13:15:41Z")

</div>

Hey bro, i have same question, but not only for right-click menus but for dragAndDrop and dynamically created widgets. If you find any solution please let me know:)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8aa1d2ce](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8aa1d2ce](https://forums.unrealengine.com/u/anonymous_user_8aa1d2ce)\
**Post date:** [August 22, 2019, 1:40pm UTC](https://forums.unrealengine.com/t/constrain-umg-widget-inside-player-screen/352147/3 "2019-08-22T13:40:27Z")

</div>

Same, for a description box.

---

<div class="post-metadata">

**Author:** ![blindminds](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/blindminds/32/1213160_2.png) [@blindminds](https://forums.unrealengine.com/u/blindminds)\
**Post date:** [October 5, 2023, 6:28pm UTC](https://forums.unrealengine.com/t/constrain-umg-widget-inside-player-screen/352147/4 "2023-10-05T18:28:30Z")

</div>

This is a link to another post with my solution…  
[Post with Solution](https://forums.unrealengine.com/t/constrain-umg-widget-inside-player-screen/59622/11)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/f/a/efaae50b02494d05f9e430bb41eda165cf4f3edc.jpeg)
