Struggling with Rotation in Multiplayer.

I’m here posting because I did a lot of research but still couldn’t manage to solve this. Good night everyone.

This is a Controller Blueprint that has a Event Tick to constantly make the Valid CachedCharacter (owned by Player, casted to BluePrint_Character and stored into CachedCharacter variable) rotate towards the cursor.

But the issue here is that in multiplayer session, it works for the Server, but the Server can’t see the Client Rotating. In the Client, it works for the Client, and it CAN see the Server Rotating.

From what I understand, but only the theory, is that this is something that should be replicated to the server, since Set Actor Location doesn’t do anything in server, just locally, and it has something that fights CMC. But I have no clue on how to implement it.

If needed, I may use C++ for this too. I have a Parent Character using GAS. Basically this is just the Third Person template with basic new logic. It is top-down view, so the camera is set.

I’m couting on you to help.

What you are seeing is expected with that graph. Set Actor Rotation on the owning client stays local. The server never has the client’s cursor, so it never applies that yaw, and the listen server keeps showing the last replicated rotation. The other direction works because the server is authoritative: its rotation is replicated down to the client.

Do not rotate the character from the cursor on both machines. The cursor only exists on the owning client.

For a top-down character:

  1. On Character Movement, turn Orient Rotation to Movement off. If the camera does not inherit pawn yaw (spring arm Inherit Yaw = false, or the camera lives on the controller), enable Use Controller Rotation Yaw on the character. If turning the actor would spin the camera, leave Use Controller Rotation Yaw off and rotate only the mesh, as in step 3.
  2. Only when Is Locally Controlled, deproject the mouse onto the ground plane, Find Look at Rotation from the actor to that point, and Set Control Rotation to that yaw. The owning client’s control rotation is sent to the server for you. With Use Controller Rotation Yaw, the movement component then replicates that yaw to everyone else. Stop calling Set Actor Rotation from the controller tick.
  3. If the camera has to stay put, rotate the mesh instead of the actor. On the owning client, set the mesh world yaw right away so it feels responsive, and also send an unreliable Server RPC with that yaw. The server sets the mesh world rotation, which is what other machines see. A client-side Set Actor Rotation will never show up on the listen server.

Character Movement will fight you if Orient Rotation to Movement stays on, or if you set the actor rotation on the client while the server still owns movement. A GAS parent class does not change any of this.