How to get weapon wheel to work with gamepad thumbstick

I was able to find a solution. I’ll leave it here for any possible future passers.

First, in my attempt of restricting the mouse movement in a circle, I came across this article by Cody Albert.

https://dev.epicgames.com/community/snippets/2WeN/unreal-engine-umg-widget-radial-cursor-clamp

This clamps the cursor in a circle and at first worked great but it actually didn’t work when i used the gamepad to move the cursor.

So I changed my approach and went with what’s probably a lot less cleaner and efficient but still worked.

I got the atan 2 in degrees of the controller’s left thumbstick and clamped that in a range. Rounded the value to put in a Switch and based on the position set the mouse at the relative segment of the wheel. It’s not the cleanest and possibly not as efficient but I’m sure if someone else does come across this they’ll be able to tweak and adjust it to make it better.

GET THE ANGLE OF LEFT THUMBSTICK

CLAMP THE ANGLE OF ATAN TO A VALUE OF 12 - 0. INT VALUE INTO A SWITCH

LOCATION OF THE WHEEL SEGMENTS ON VIEWPORT

SET LOCATION OF MOUSE BASED ON INT VALUE

FUNCTION FOR SETTING MOUSE POSITION BASED ON THUMBSTICK ANGLE

The clamped Out Range value was an arbitrary value based on what felt the most responsive when testing.

END RESULT
Gif2