Why can't I seem to replicate the lookRotation to the Server?

I am using a listen server and it seems that lookRotation is replicating from the server to the client, but not from the client to the server. I am probably overlooking something.

Edit: Added current blueprint nodes.

85469-mousemovement2.png

Server replicates to clients automatically but clients don’t do the same. If you want your client to tell your server to do something you need something called RPC (Remote Procedure Call). Basically what you need to do is Add a Custom Event and in the replication section you need to select the Run On Server option, then connect the nodes that you want the server to execute, branching off of this event. This way if you are a client and you call this function, it will travel to the server and it will do it for you.

MacDx,

You helped me on my previous question, so you should know that I’m aware of RPCs. I have tried using a Run On Server RPC, and that doesn’t seem to replicate the rotation.

In the image above, it shows a method which has allowed me to replicate the rotation from the server to the client, but not the client to the server. I had another method which was similar, but used a Multicast RPC instead of the replicated variable. It, however, has the exact same result.

So, today i made system for stuff which you asking, replicate rotation from client to server. I use it to make “look at mouse cursor” behaviour.

When I need to change rotation, i call RPC on server which set up required rotation as variable. This variable is RepNotify and since it changed on server, its getting replicated to all clients and change can be detected in OnRep_ function generated for variable. Another variable is current, local character rotation. Timer is looping and this function update rotation smoothly between server required and current client.

I’ve tried to do what you you’ve shown here, but I don’t think that can work for normal mouse input rotation.

how does thats matter, you still trying to replicate variable from client to server and all other clients, how you use that variable thats different topic.

Either way, the most I can get to work is replicating the rotation of server to the client. The client’s rotation will not replicate to the server.

I just did a test on the second branch of the sequence shown in the first image. I a did simple increment of the yaw rotation in place of the GetControlRotation. It replicated on both the client and server just fine. Something is either wrong with GetControlRotation, or I’m overlooking something.

This is the example which I’m basing my implementation off of.

I think I have the same issue. Cant send message from client to server about changed variables

You should revisit unreal blueprint networking documentation, you missing basic knowledge about networking. Very first screenshot shows how can you set variable from client to server.