# Widget points at mouse cursor

**URL:** <https://forums.unrealengine.com/t/widget-points-at-mouse-cursor/451168>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [June 24, 2019, 1:04am UTC](https://forums.unrealengine.com/t/widget-points-at-mouse-cursor/451168 "2019-06-24T01:04:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sam\_Carey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sam\_Carey](https://forums.unrealengine.com/u/Sam_Carey)\
**Post date:** [June 24, 2019, 1:04am UTC](https://forums.unrealengine.com/t/widget-points-at-mouse-cursor/451168/1 "2019-06-24T01:04:36Z")

</div>

I am trying to create a radial menu system. Currently, I has some code which rotates a widget around the center of the screen to face the mouse.

 ![280586-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/5/f/f5f2ed9194188c974c742adec67822838a1490bb.png)

This code seems to only work in some aspect ratios / resolutions as seen in the video linked below. Any ideas of how this could be fixed?

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/e/1/2e17575c4e19389c29dfa71574b05140ca1998bb.jpeg "Widget points at mouse cursor") ](https://www.youtube.com/watch?v=vKYblPLSoSU)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [June 24, 2019, 7:20am UTC](https://forums.unrealengine.com/t/widget-points-at-mouse-cursor/451168/2 "2019-06-24T07:20:12Z")

</div>

Not an answer, more of a careful suggestion:

It may not be the case here but stretching the viewport like this will give you inconsistent results in many areas - it’s not always interpreted correctly and not a great debugging _tool_. For example, the PIE geometry of the widget (and _GetViewportSize_, too, afair) updates only when one releases the left mouse button after changing window size - if you’re tracking something in screenspace, this will be quite inconsistent, producing incorrect offsets not unlike the ones observed above.

* * *

Have you tried actually setting the resolution (the way the end user / final product would do it) and then observing the behaviour?
