Multicast event not replicating from server to client - solution found, but not happy with it :)

Hi there,

it took me most of the day to replicate a simple rotation from the server to the client.
Usually I work with “switch has authority” nodes and call the multicast event for true and the run on server event in between on false. This works fine for nearly all events. But since I have switched my inputs (and with that the switch authority nodes and replicated events) from the controlled Pawn to a custom PlayerController I am encountering problems with this solution.

I want to set the rotation of a scene component of the controlled Pawn on keypress. (add local rotation)
The function and rotator variable is located in the Pawn Blueprint, while the switch has authority node and both RPC (run on server / multicast) are located in the PlayerController Blueprint. The solution mentioned above let’s me replicate this rotation from the client to the server, but not from server to client. As last resort after hours of testing I created some additional RPC events located in the Pawn. Now I call the “multicast” event on authority in the Player Controller but instead of directly calling the function from this event, I call another multicast event, but this time in the Pawn. Only this solution made the rotation replicate to the client.

I am kind of frustrated though, because I absolutely do not understand this behaviour since all the other functions and events replicate perfectly fine without having to create these extra multicast events in the Pawn.

Maybe someone can explain this to me :slight_smile:

Hi, each client player controller exists only on that client and on the server. Therefore the server knows about all player controller, but each client only knows about its own player controller. Therefore multicast will not work there (this event won’t execute on the other clients since the player controller does not exists there).

The pawn exists on all clients, therefore multicast works there.

You might wanna take a look at page 9 of this here http://cedric-neukirchen.net/Downloads/Compendium/UE4_Network_Compendium_by_Cedric_eXi_Neukirchen.pdf

1 Like

Hi, thx for the answer.
That’s what i read too, but since all the other multicast events do replicate even though I have them in the PlayerController - I am still confused.
Guess I just swallow it and put it back into the Pawn :slight_smile: