Is there a specific way to set gamepad focus?

When my menu loads I’m able to navigate the menu with my controller and select buttons, however when it first loads I am unable to select (click) the first option until I move. So it’s like the gamepad doesn’t have focus on that first option.

I’m using SetFocus() and SetKeyboardFocus().

2 Likes

I have been battling this exact issue forever as well. As far as I can tell, everything should be working… It almost feels like a bug with the engine itself? Idk…

1 Like

Alright! I’ve figured something out! (Images for reference: setting focus in UE4 issue solve - Album on Imgur)

So all my buttons were setup as blueprint templates that I was calling in each menu. That way, every button had the same behavior and styling.

I realized that when I was setting the focus, I was setting it to the blueprint template and not the button that was contained within. So, in the event graph, from the blueprint object (let’s say the “start” button), I then pull from there and get the “menu button” object and set that to be focused.

Now i’ve set the focus to the button object instead of the button blueprint template.

After ages of trial and error and getting nowhere, I’m glad I got there. I hope this helps others too.

4 Likes

@mattsvlog
Man it’s been 1 week I try everything to make my controller work properly and you just save me, I was doing the focus on the blueprint directly instead of the Button. Thank you so much.

No problem! As soon as I solved this, I had to make this post. Glad I’ve helped at least 1 person :slight_smile:

1 Like

Hi, wanted to add to this topic in case anyone else was struggling with this issue. If you set focus directly after Event Construct, it won’t work. Use very small delay in between:

5 Likes

It seems so easy and logical yet I have been looking for the solution for a whiiiiiiiiiiile. Thanks a lot :slight_smile: