Strange issue with replicated variable

Hi,

I’m trying to replicate the the **Delta rotator **between the actor rotation and control rotation to the non locally controlled characters but the value is simply not replicated as is.
I made a simple example to demonstrate the issue.
This is a dedicated server with 1 client, here I’m saving the delta rotator in a replicated variable (only the server does that), and then printing the value in both the server and client, you would expect the value to be the same but to my surprise it’s not as shown in the second picture.

as you can see the values are not the same, replicating just the control rotation works just fine, or only the yaw/pitch as float also works but when it comes to replicating the delta rotator I get that result.
Am I missing something obvious ?

Thanks.

EDIT:
After looking for a response I found this answer from a staff:
This is happening because the rotator delta node normalizes the angles to the range -180 to 180 before returning, but when we compress rotators for network serialization, we convert them to the 0 to 360 range. Both of these ranges can describe a complete circle, and should be equivalent in practice

I fixed my issue by Normalizing the replicated variable by 360. (Delta Rotator => Replicated variable with FRotator(360, 360, 360))

1 Like

I’ve figured out the issue, look at the bottom of the post.