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