Weapon Wheel

Hey guys, I’m working on a weapon wheel in a first-person game that appears when you hold the Tab Key/Left Shoulder. I’ve created a wheel background and placed a series of buttons around the wheel, which appear/disappear depending on what weapons you have. It also displays what ammo you’ve got.

What I’m having trouble with is actually having the weapons be select-able when the menu is up. Meaning, if I use a gamepad and press left shoulder, I should be able to use the left analog stick to roam the buttons on the circle, triggering their “hovered” states. Then when I release L shoulder, I should equip that weapon. That’s what I’m working toward anyway.

I’ve implemented the weapon wheel widget as a Widget Component in the Player blueprint. Then I set up an InputAction to set the widget component to be visible when I press down Tab or Left Shoulder, and not visible when I release. I think part of my problem is that I’m not giving the wheel proper focus, though I’ve set everything to be “focusable”. Also not sure if this is wrong but I’m never really adding the widget to the viewport per se, just setting its visibility via InputAction in the player BP. Adding “Set Game Input to UI Only” when I have the tab or L Shoulder down just causes the menu to flicker for a frame or two and disappear for some reason.

Anywho, going to keep chipping away at it, but any nudge in the right direction would be greatly appreciated. Thanks in advance for any advice!

One thing I figured out was “Set Input Mode to Game and UI” was the reason for the flickering. Well specifically, trying to set the focus on one of the buttons when the wheel was open was causing the tab key to be released. Basically as soon as the widget opened up we were implicitly releasing the Tab Key due to a lack of focus. So even though I still had it held down on my keyboard, the game didn’t know about it. So now I am looking at how to keep the wheel open while cycling through buttons.