Second gamepad won't capture input until first mouse click

Greetings !

So, I was using Unreal 4.5 and I had no problem with second gamepad at all.

After upgrading to 4.6, I noticed something a bit annoying:

When playing in editor, the first gamepad works fine( capturing input), but the second one WILL NOT capture input until you click at least once using the mouse (a click in the viewport).

Is this a bug? or is there some change i missed?

Hi FrostSnake,

Thanks for the report! I was able to reproduce this in 4.6, and entered a bug report for the developers (UE-6622). I will let you know when I see an update for it. Thanks!

Greetings :smiley:

Any news about this? any workaround? my thesis is after 10 days :open_mouth: I gotta fix it soon :confused:

Hi FrostSnake,

There hasn’t been any change yet, but it’s unlikely we’ll see anything until 4.8. For now, you’ll need to click in their viewports first to enable gamepad input.

Sad, but thanks :smiley:

C++ workaround:

Override GameViewPortClient with your own class which overrides ReceivedFocus with this:

    void UYourGameViewportClient::ReceivedFocus(FViewport* Viewport)
    #endif // WITH_EDITOR

You also need to set Game Viewport Client Class to your new class in Project Settings->Engine->General Settings, include SceneViewport.h and SlateBasics.h and add Slate as a dependency in YourProject.Build.cs

Thank you !

I’ve run into the same problem. It may be worth looking into this answer as well:

Basically, it was suggested to call the SetFocusToGameViewport node in Blueprint, which fixes the issue; but, the node only works if called after EventBeginPlay. I setup my main menu in my game so that players have to press a button to continue, and when they press that button I move onto the next menu screen, as well as call SetFocusToGameViewport. It’s not the most elegant way to do it, but it works right now.

Hopefully this will be fixed for 4.8.

Any updates on this issue?

Hey Jonathan,

Sorry, no, there hasn’t been any update yet. I have included a note that there is more community interest in the bug report, and I am going to email the devs to see if they can bump up the priority on the issue.

Thanks. Appreciate it.