[Beginner] - Replicating Camera Rotation on Multiplayer - Why no Up/Down-Replication? :(

Hey Guys!

After doing many tutorials and workshops for unreal engine i’m trying to create a simple fps game with a simple multiplayer mechanic … But now im Stuck!

The Problem:
I cant replicate the camera movement (up/down) … I think its called “pitch” … I tried so many things, but nothing worked for me… On server-side everything is fine, but if i use my mouse on the server the client can only see the left-right-rotation.

Resources:


I added a variable “Aim-Rotation” and then modified the transform bones so my camera “follows” the spine of my character.


In my BP-Class im gonna set THIS AimRotation with the Look Rotation - Variable (next image)


This is my update method to update my rotation…


And here I set the rotation with a break-rotator to THIS Look Rotation-Variable

I tried to put all variables on replication and stuff but nothing worked for me…
Can u help me guys? I tried for about 1 Week now - still noch success :smiley:

THX!

Still learning multiplayer; however, I believe your GetControlRotation is getting the rotation from the clients “copy” instead of getting this information from the server or that which is running the EventTick. Thus, try the GetControlRotation off the EventTick event and pass that result into Server_X and Client_X.

Pitch is already replicated through a hidden variable called RemoteViewPitch.
As far as I’m aware the only way to access it by default is to use function “GetBaseAimRotation” instead of “GetControlRotation”. With this method you don’t need to replicate anything.

The caveat of this method is that RemoteViewPitch is compressed when replicated so it only updates in ~1.4 degrees increments. If you want smoother results, you either have to implement a smoothing system onto that variable, or replicate your own pitch variable with precise values.

ThX!!! but how can I get the method to Smooth that updates?

every time you get a new rotation value, change the value of your current rotation value by some amount every tick (0.1 degrees for example).
you can use the tick delta to make sure the smoothing is the correct speed across frame rates.

But in this way it still cause the inevitable aim delay, no matter how it’s smooth. So is there some other way to solve this issue to fix the Network Aim offset(yaw)?
btw I use the following method
but it still have the delay

well I fix that! just use the GetControlRotation in local and use the GetBaseAimRotation in non-local, and everything go as it should!