Description

When running multiple clients in PIE,
It looks like first created viewport client handles every input event.

I tried to narrow down the causes and found that it's because SlateApplication knows just single game viewport client, not every viewport.

First created game viewport widget is registered to SlateApplication. And when input event invoked, it is passed to registered GameViewport widgets because of below code.

// \\Engine\Source\Runtime\Slate\Private\Widgets\Input\SVirtualJoystick.cpp, Line 403
FSlateApplication::Get().SetAllUserFocusToGameViewport();

It forces SlateApplication to change a subject of focus to the registered game viewport.
Before it, clicked game viewport had a focus and was in charge of handling an input event.

As removing this, It is working correctly except the feature of 'Route 1st Gamepad to 2nd Client.'

This feature let controller id remap to next one by increasing controller id. But its code looks not robust or reusable.
And I think that Most mobile developers don't need to test multi-play on a PC using mouse and keyboard. Also, it is worth when running only two clients.

Steps to Reproduce
  1. Open the editor
  2. set Use Mouse for Touch to true
    Edit > Project Settings > input > Use mouse for touch
  3. Set the Number of players to 3 in the PIE settings
  4. Play in Editor
  5. Click on the window that was opened last
  6. Click on the right joystick and rotate the camera
  7. Go to the next window and try to rotate the camera
  8. Notice that nothing happens

Expected: The camera rotates with using the virtual joysticks
Result: The Joysticks to do not move the camera

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-52603 in the post.

1
Login to Vote

Won't Fix
ComponentUE - Editor - UI Systems - Slate
Affects Versions4.184.18.1
CreatedNov 21, 2017
ResolvedAug 18, 2021
UpdatedAug 18, 2021