Client and server rotation are calculated differently?

So I print string’ed a rotation that I send to the server and noticed that it’s calculated differently whether it’s on the client or server side.

If you look at the picture, I’m showing the rotation before being sent to server and then right after it’s received on the server, yet, they’re different.

So server side it’s 0 - 360 degrees but client side it’s 0 - 180 on starboard side and Minus 0 - 180 on the port side, if I’m using the Yaw. How am I supposed to calculate look ats and orientations if they’re calculated differently? :cry:

It’s the same for all 3 axis.

299587-2020-04-12-05-13-31-ship-game-preview-client-1-64.png

What comes to my mind is that there is a delay (due to the fact that you are sending data over a connection, even if it is local) and the printings are not aligned. So two prints that are next to each other doesn’t mean they refer to the same instant.

Can you try to do only one print over the client and only one print over the server? Alternatively, can you send also a time-stamp with which you can check the timing?

As for the representation, whether is 0 to 360 or -180 to 180, as far as it is the same angle, it shouldn’t matter (also because internally, they are represented with another structure called Quaternions)

Hey FSapio, thanks for the reply, as expected, it was my fault, I wasn’t calling the server / multicast correctly so the server and the client were out of sync, derp haha