PIE 2 players: is it possible to give input to two windows at the same time?

Short Version:
I’m trying to test a LAN game between 2 players in PIE (so on the same machine). The problem I’m having is that only one window seems to be able to have focus at any one time, while the other window will stop receiving input.

Long Version:
Specifically, in my game I’m trying to get one player to use SteamVR/Vive and the other to use the keyboard. The final game will likely be played over LAN / Internet but for testing / development I’m trying to use PIE so that I can quickly pop up 2 windows within the editor and test things by using the Vive + motion controllers in one window while using the keyboard to move the second, non vr player in the other window.

From my tests however, it seems the windows will only pass input to the playercontroller if they are on focus.

I set a bunch of breakpoints on UPlayerInput, APlayerController and UInputComponent but so far haven’t found anything that might lead to a way to make this work.

If I make a build however I can get it to work like so: I make one build with the steamvr plugin enabled and “start in vr” enabled. Then I disable the plugin and make another build. Now if I start the vr build, it goes into borderless fullscreen. Then I start the other build (the one without the plugin) and it starts in windowed bordered mode. And in this case, even if I have the windowed non vr instance in focus, the fullscreen vr instance still receives input from the motion controller’s triggers, etc.

I’m trying to find out what is it about the standalone builds that allows input to make it to the playercontroller even if the window is not on focus (or if it is about the vr standalone window being borderless and fullscreen for instance).

You need two have two different inputs connected:
1 Mouse and keyboard
2 Control/Gamepad

Then you have to set true the option in EditorPreferences/Play/MultiplayerOptions/Client/Route gamepad to second window. This way unreal will force both clients to use a different input, and you can test both clients at the same time

1 Like

I may be crazy but I have both a keyboard and 2 controllers but non of it works. It does not assign the keyboard to one widow and either of the controllers to the other.

I can use the keyboard and controller in one window but that’s useless in my case I’m afraid.

Any update on this?