Widget points at mouse cursor

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.

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?

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?