Render model spreads out infinitely when attempting to rotate

When i try to rotate another player in mulitplyaer using setLocalRotation() it spreads them out so that it fills the whole map. i have no idea what im doing wrong.
https://playcanvas.com/editor/scene/1628849
The blue stuff is the other player
Screenshot 2023-01-05 11.51.14 AM

Hi @Granted,

Did you figure this out?

Could you explain a bit more what you mean with players being spread out?

Here is what I see when launching it:

servers offline rn but when it was on the player would glitch and spread out infinitely when they moved. THat happened when i set x to zero all the time. i only want y rot. but when i set x back to what it should be for rotation players dont spread out but then they move in every direction.

That seems like an issue with your networking/movement code. I can’t be of help on that sorry, but one good way is to debug it step by step.

Try reading in the console/debugger the values that are sent for position/rotation, then the values that are received on the other client. If there isn’t any issue there, then check how they are applied on the player model.

Hope that helps.

Quaternions don’t have X/Y/Z axes in the same way you would treat Euler Angles. So if you are zero’ing a quaternion X, its going to give you unexpected behaviour when it’s applied to the transformation matrix.

Rather than trying to modify the quaternion directly, I would send the euler angles that are from the Player Controller instead.