Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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!

Product Version: UE 4.16
more ▼

asked Dec 01 '18 at 07:14 PM in Blueprint Scripting

avatar image

26 1 1 5

avatar image kgkraeer Dec 02 '18 at 12:17 AM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question