In the current released version (as well as main), using the mouse to drag a rotation on either X or Z axis results in more than one blockly block value being updated - i.e. if you rotate on X axis, all axis values are changed. This might be a known non-issue because maths, but recording it anyway.
To Reproduce
- Add a mesh
- Click the rotate gizmo
- Use the X axis to rotate the mesh and look at the values in the blockly block
This bug isn't present if you use keyboard rotation because it implements the rotation differently. I'm not sure if this is an issue or not in practice - it appears to be to do with the complexity of rotation in 3D space.
It's possible to make it work correctly for mouse drag on X and Y using the following in rotDragEnd() before updating the block, but Z still affects multiple values.
if (mesh.rotationQuaternion) {
mesh.rotation = mesh.rotationQuaternion.toEulerAngles();
mesh.rotationQuaternion = null;
}
Claude also said:
The real fix is to change the gizmo to local space: set updateToMatchAttachedMesh = true in the configureRotationGizmo call. In local space the gizmo rotates around the mesh's own axes, so the operation is Qy_existing * Qz_local_delta, which always decomposes cleanly back to only Z changing. I verified this with the actual numbers.
The tradeoff: in local space the rotation ring handles tilt with the mesh (they follow the mesh's orientation) rather than staying aligned with world up/right/forward. Whether that's acceptable depends on how you want the gizmo to feel to the user.
In the current released version (as well as main), using the mouse to drag a rotation on either X or Z axis results in more than one blockly block value being updated - i.e. if you rotate on X axis, all axis values are changed. This might be a known non-issue because maths, but recording it anyway.
To Reproduce
This bug isn't present if you use keyboard rotation because it implements the rotation differently. I'm not sure if this is an issue or not in practice - it appears to be to do with the complexity of rotation in 3D space.
It's possible to make it work correctly for mouse drag on X and Y using the following in
rotDragEnd()before updating the block, but Z still affects multiple values.Claude also said: