I've been looking into replicating HMD movement across the network
I found a thread where there was an example "MPRepro" to show the how to do this, but testing that example, I see behavior where only the client's movement is replicated to the server, but not the server's to the client.
The setup calls a replicated function on the server to update the HMD position, and I see the server function get called for both players. The replicated function calls a multicast function back on the clients to update the position for all pawns, but the client is only ever getting that call back for it's own pawn.
Despite what [Link Removed] and the Replicating Variables in Blueprints > RepNotify documentation says, the rep-notify function does not seem to get called on the client.A
---- UPDATE ----
This issue was closed because it was determined the setup of the original project was invalid / the Engine was behaving as intended.
In this specific case, the Properties in question were being changed on an Actor that was marked as "Only Relevant to Owner" (which happens to be the default setting for APlayerController). This meant the properties were only ever being sent to the owning client, and hence the owning client was the only one receiving the RepNotify.
Further, the project was attempting to call Multicasts directly on client machines. Multicasts are only intended to be run on the Server. While this does happen to trigger the event locally, this behavior isn't guaranteed and was not what the project had intended to do.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-41254 in the post.
3 |
Component | UE - Networking |
---|---|
Affects Versions | 4.14 |
Target Fix | 4.18 |
Created | Jan 30, 2017 |
---|---|
Resolved | Aug 9, 2017 |
Updated | Sep 16, 2019 |