Multiplayer replication (Pitch Rotation) issue


I’ve been struggling to figure this out for a while now. When I click on replicated on the FirstPersonCharacter, everything replicates fine except for his Pitch (X-Axis) rotation. I can see it when I play as the Client for an example, but the server can’t see the client rotate his pitch. After a long time of searching, I came across a video explaining how to do this using C++. Heres the video: <----- He explains how to do it at the beginning.

How can I do this using Blueprints??

It is not that simple. First search forums for multiplayer documentation. Not one done by epic, there is some much better, just cannot remember by who.

To replicate all that stuff you need bit more than just setting variables to replicate.
You see only listen server (aka fake client) can replicate things to server, everything else is replicated only FROM server TO client. So just checking that checkbox will not do it.

To make anim and pitch etc replicated, you need first create chain of events (Sadly there is no direct event to trigger from player character directly on server. It all gets ugly.
I just realized that full explanation of whole multiplayer setup is for some big tutorial, not single post here, but anyway:

you need to pick method how you communicate from clients to server. My choice is trough “GameState” because its easy to get reference to it, and it also exists on server and each client.
Only blueprints that exist on server and client can trigger server side events. And server side events is how you replicate from client to server (nothing else works, at lest not in 4.11 when i made it).

So create local event in gamestate that gets data from player character.
Then make next step in chain. ie. server side event that just passes all those variables to server.
From client side event call that one in server.
Then create variables ( notify type) in your player character.
Then change those variables in corresponding character on server, it will replicate back to client character.

Not so easy. Also this solution is kind of bad (but its simplest, so use it for learning). Flaw of this solution is that every action you do on client will go trough server before its executed. Not problem on lan but with more than 20ms lag you can see it.

Multiplayer is huge can of worms.