UE4.19 - Multiplayer VR, menu system:
1 – Bug with Click –
Description: click is not triggered on any client when more then one client is present in game
[WORKS] when testing in multiplayer environment with one dedicated machine for dedicated server and one dedicated machine for a client
[DOESN’T WORK] when launching a second client
Note: if one client leaves game and remains just another one client, CLICK starts working properly
Hack/Workaround:
Fortunately HoveredOn/Off functionality is triggered, so I know which widget is currently hoveredOn.
I trigger “click” functionality directly from controller, without relying on “mouse left click”,
and do stuff related to widget.
Unfortunately: HoveredOn/Off functionality stops working normally if more than one client is connected to game.
2 – Bug with HoveredOn/Off –
Description: HoveredOn and HoveredOff events are triggered one after another on each Tick, when more than one client is connected to server, even when cursor doesn’t move and is always on button.
So HoveredOn basically works like “OnColliding”.
good news is that at least HoveredOn starts being triggered on hover-on and stops being triggered on hover-off.
bad news is that you really never know when hover-off happens, since HoveredOff is also triggered on every tick right after HoveredOn.
So I defined true HoveredOff event.
Hack/Workaround:
I have set parent actor of this widget to check on each Tick if HoveredOn has been triggered.
If HoveredOn is not triggerd for one Tick, on second Tick I know for sure that we have a true HoveredOff event.
cons of this solution is that I lose one Tick, but this is not crucial for me, since this is just a menu system with buttons.
In addition, to cover loosing of “One Tick”, I could be using a preventive approach and calculating stuff on each tick, one tick before “True HoveredOff” event, and then applying calculations.