Rotate gizmo not working with non uniform mesh scaling

Hi all.

The gizmo rotation is not working when the mesh has non-uniform scaling
Check this pg: https://playground.babylonjs.com/#31M2AP#358

Yes, it is a known limitation of the gizmo rotation.

See for eg:

There are a number of other posts in this forum on this topic.

It was working with the early versions of babylon js. I noticed this problem after a couple of months. The position gizmo works well

cc @Cedric.

Maybe it was working in some cases and not in others, that’s why we now issue a warning when trying to use the rotation gizmo with non uniform scaling.

Since bjs 3 or 4, rotation with non uniform scaling makes the mesh to explode because inconsistency between the world matrix and orientation quaternion.
I’ve changed that recently to display a message instead of watching NaN vertices everywhere.
It’s possible to have non uniform scaling and rotation but you have to set updateGizmoRotationToMatchAttachedMesh to false.
Another solution is to use the gizmo with a proxy transform and apply rotation to the mesh when dragging gizmo.
I’ll find time to improve this after 6.0 release.

2 Likes

I tried to set this updateGizmoRotationToMatchAttachedMesh to false, but the mesh expands while rotating. Anyway, I will be waiting for the 6.0 release. Thank you!

1 Like