I am developing a small multiplayer game with an authorative server where the server simulates the gameworld collider in 2d. On the server i apply rotation to certain points based on a radians value to rotate the object around itself. This radians value is basically always increasing when you rotate Right, and decreasing to rotate left. Since i calculate the rotation with sin/cos the radians value does not need to be normalized.
Now i want to update my local threejs object with the same rotation and am a bit stumped on how to do it.
In threejs, i want to rotate my object around the Y Axis. Here the rotation is normalized to go from -Pi/2 - Pi/2 and when one of the max points is reached the value goes in the opposite direction in which case it also seems like the X,Z rotation basically flips from 0 to +PI or -PI depending on the direction of the rotation. I don’t really understand whats going on, any tips on how to convert/normalize my radians value to the threejs rotations ? What do i need to read up on ? Or find a different approach ?