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.
Expected: The camera rotates with using the virtual joysticks
Result: The Joysticks to do not move the camera
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-52603 in the post.
1 |
Component | UE - Editor - UI Systems - Slate |
---|---|
Affects Versions | 4.18, 4.18.1 |
Created | Nov 21, 2017 |
---|---|
Resolved | Aug 18, 2021 |
Updated | Aug 18, 2021 |