Download

Character movement not being replicated (and other replication woes!)

Apologies for what will inevitably be a lengthy post but I’ve been having some real difficulty in getting my head around replication and networking with blueprints. As soon as I think I’ve figured out the theory behind everything, some kind of error crops up which makes me think I’ve misunderstood the entire process.

I’ve asked around in several places and had some good advice, but the results I’m seeing seem to be going against what I believe should be happening.
Let’s take for example, replicating mouse driven player rotation across the network. My understanding on how this should be accomplished is as follows:

Step One: Record the mouse position locally (I’m doing this by getting the hit result under the cursor)
Step Two: Send the mouse location through a custom event set to replicate on the server.
Step Three: Make the server rotate the actor to look at the mouse location. Because the character movement is replicated the character should rotate on both the server and the client.

In my project the server is seeing both it’s own pawn and the client’s pawn rotation correctly. The client is seeing the server rotation correctly, but not it’s own rotation. You can see this in the following video:

(client is on the right, server on the left)

I’ve tried almost every method of doing this I can think of including multicasting the event and rotating the controller instead of the actor, but nothing seems to work consistently. Any help would be fantastic, on paper replication seems so simple but I have real trouble getting anything to work over the network!

I’ve got a few other issues I’ve been experiencing but I’m hesitant to ask until I can get my head around simple replication like this one!

Thanks!