Aim offset 1D not replicated

I’ve made a aim offset for the character to look up and down. This works fine for server and client on their own screen. But when client is looking at server or vice versa, its only showing the character looking up and middle. As soon as the character goes pass middle to look down the animation points the character up. So recap, I look up with character it replicates to everyone, when I start to look down, as soon as I get passed the middle it points the character back up. It works fine when looking at your owning character, just when your looking at a different player you see this. HELP!! Lol

You will probably need to make a replicated variable that holds the information of what position you are currently in that Aim Offset. Correct me if I’m wrong but you are probably doing something like this right?

When you move your mouse you are adding or subtracting from a variable. This variable is passed to your animation blueprint to set the Aim Offset coordinate. So what you can do is turn this variable into a replicated one, and you will probably need to make a Server call to set it on the server every frame.

I’m getting rotation of of camera I think “not at computer” and braking rotation and getting pitch. As I said, it works fine for the middle to up animation but as soon as I try to point down it does not replicate the down, and puts the character back upwards. I’ve replicating everything I can think of and custom events on server, on client, multicast and so on.

Hmmm so when you point it down it goes up again? that sounds more like a data problem than a network one. Can you try printing the values of the rotator you are using and posting the image?. Remember that yaw is rotation around the vertical axis. And Pitch is rotation around the axis that is perpendicular to your forward.

Excuse the necro but I think I have an answer that might help others.

I had this exact same issue, my clients would be fine looking in the top half, but the moment they tried to look down (beneath pitch 0), they would snap to the top.

From the perspective of observers, the Pitch value would drop under zero and then wrap around to 360 (thus looking at the sky).

I solved this issue by putting in a clamp node.

1 Like

this also works, if the angle never exceeds -90 to 90 when printed to the screen.