Client Pawn replication not working client side but works server side

I have an RPC (in c++) in my PlayerController that moves the player pawn to a location the player clicks (static boxs in the level). I click in the client the pawn updates its position correctly on the listen server but doesn’t update in the client. When I click in the listen server the client gets the updated pawn position for the listen server player.

I know i must be missing something simple and obvious but can’t track down what it is.
I have replicate movement enabled in the pawn blueprint. I’m using the same pawn blueprint for both players

Thanks

You can make a Client-Server function in PlayerController blueprint to tell the server move your character for you, that way all client will be the same.

the server always replicate the position, but when playing you are client anything you move in client will not replicate unless you tell server to do that.

Check the part for Command from client to server, instead of bool you can change that to position, then server will take that position then he will move your character for you, the position then will be replicated back to you and other client.

Check this if you want to do in BP Blueprint Networking Tutorials - Unreal Engine

Shouldn’t the server replicate the new position back to the client?

That is not what i’m currently experiencing. The client’s pawn is moving on the server but not in the client itself.

ok, how you move you Pawn ? and let’s be clear the window you play is owning client, the u have server (these 2 will be same if you play in listen server), then the other will be remote client, so if i understand pawn move on owning client, server and not remote client.

investigator->SetActorLocation(Location->GetActorLocation());

In the listen server (the editor viewport) i see the server pawn and the client pawn. In the new window that was created (the client1 window) i see the server pawn and the client’s pawn. If i click on a location in the client i see the pawn move in the server viewport (i should see it move in the server viewport and client window). If i click on a location in the server viewport i see it move on both the server and client.

Here are pictures to help explain better

Ok, if replicate movement on Pawn, on server move all client pawn will move, so something wrong from when you click location to and call set actor location on client side.

From what i guess, if you play on server only server call set actor location, so the location is replicate properly. If you play on client, set location may be call from both side server is correct, but client is wrong so it override your pawn on client side.

For this work make sure set location only being call on server side, client only provide location for server.

so adding the movement to happen in the client then notify the server to move the client as well works as expected. I really wanted to just have the server replicate the position back to the client so they will always be in sync but i guess i can make sure they are in sync at some point in my logic by sending the actors position that the server thinks they are at back to the client

Thanks for the help