Editor Bug: Rotating an entity can sometimes flip it

Hey, I’m having a weird issue when rotating entities inside the editor, that sometimes rotating past a certain point, the X and the Z axes flip from 0 to -180, despite me only rotating on the Y axis.

Video:

Sample project:
https://playcanvas.com/project/634129/overview/rotation-bug

That’s expected behaviour due to the constraints of quaternions.

PlayCanvas doesn’t store rotations in Euler angles and therefore the numbers flip because there are multiple representations of a rotation.

I see. Can I assume that the Quaternion has the “correct” representation then?

Depends on how you define “correct” as they are both are technically. The Euler angles are calculated from the Quaternion.