I am pretty certain what the best solution for my case would be and what I am going to do. But keep in mind that this solution is not the best solution for every case, so try to consider all the different options in your case.
So for the server to clients replication, I will override PostNetReceiveLocationAndRotation() on my Pawn, so that the Client does not do anything, when he receives an update, since the Client acts authoritative in my case, because the Pawn has no direct Gameplay impact, like the observing Pawn in a strategy game. So that method would look something like this:
void AMyPawn::PostNetReceiveLocationAndRotation()
{
if (!IsLocallyControlled)
{
Super::PostNetReceiveLocationAndRotation();
}
}
For the replication from the client controlling the Pawn to the server, I will use an Unreliable Function every tick. But I will also keep track of how often the function was with the same Location value. Kinda like this:
pseudo code:
uint8 LocationUpdateRepititions;
if (LocationChanged())
{
SentUpdateToServer();
LocationUpdateRepititions = 0;
}
else if (LocationUpdateRepititions < 10)
{
SentUpdateToServer();
++LocationUpdateRepititions;
}
Of course I would have to change the Threshold based on how well this works.