Could we update PlaneRotationGizmo to use mesh.rotation if no quaternion is set?
Currently it forces a change to use mesh.rotationQuaternion.
To avoid issues with back-compat,
perhaps a (parent) RotationGizmo.useQuaternion property (default true) which switches to a different dragBehavior function for each child gizmo when changed ?
…and if you’re unaware of this (like me) and mindlessly use mesh.rotation in the rest of your code, it bugs out and you spend an hour wondering what’s going on … while thinking it looks perfectly fine and should work
I’m not sure about the change. Correct me if I’m wrong: I guess your tried to read back mesh.rotation after doing some rotation using the gizmo and it was out of sync?
If it’s what happen, I’d prefer add a synchronization system to update mesh.rotation from the quaternion instead of changing the gizmo to work on euler.
I did a simple change to always use the Euler angle here when an option constructor Boolean is set to true:
I keep the calculation with the quaternion and set back the Euler angle here :
But the Mesh.rotationQuaternion is not updated once you change the Mesh.rotation with code. Only the Quaternion to Euler works when using the Gizmo. So the 2 rotations are out of sync. Which might not be what you want ?