Hi, I’m currently working on a 3D scene editor based on babylon.js.
Now I’ve encountered a problem that rotation gizmo got stuck after scaling mesh.
And the console print:
Unable to use a rotation gizmo matching mesh rotation with non uniform scaling. Use uniform scaling or set updateGizmoRotationToMatchAttachedMesh to false.
So I just set rotationGizmo.updateGizmoRotationToMatchAttachedMesh to false.
But the rotation gizmo just rotated badly (not sync with mouse behavior almost every time).
is there any way to achieve rotating non-unifromly scaled mesh correctly with gizmo?
I mean maybe some tricky way else (i.g. hard coding).
because I really need rotation gizmo work properly.
thank you.
Press q, w can switch gizmoType.
Scale mesh first then rotate mesh any direction. (you should press ‘a’ after scaling)
a few trial you’ll find out the rotation direction was not correctly sync with axis.
I’ve scaled the y-axis(vertically) and switch to rotationGizmo.
In the beginning, rotation was stuck then I press ‘a’ to set rotationGizmo. updateGizmoRotationToMatchAttachedMesh to false.
the result is that rotation behavior not sync with gizmo axis.
Making it so needs a quite big refactor in Gizmo regarding transformNodes and Nodes.
Until it gets more prioritized, I would suggest to not allow non uniform scaling or if it’s not possible then have a proxy TransformNode that you edit with the gizmo and apply back the rotation/scaling/translation to the mesh.