Rotation gizmo does not work under certain circumstances

Hi everyone :slight_smile:

I have a question about the rotation gizmo.

In my project, I have to inherit the rotation of the parent node when using the rotation gizmo of the mesh.

So, I set “updateGizmoRotationToMatchAttachedMesh” to true (line 28 in playground link below)

This is where the problem occurs.

The rotation gizmo doesn’t work when each factor(x,y,z) of mesh scaling is not in the same proportion
(e.g. mesh.scaling = new BABYLON.Vector3(1.2, 1, 1));

Is it intended or is it a bug?

Thanks for your advice in advance :+1:

That’s a know limitation. See the warning which is generated in the browser console log:

logger.ts:103 BJS - [12:51:54]: Unable to use a rotation gizmo matching mesh rotation with non uniform scaling. Use uniform scaling or set updateGizmoRotationToMatchAttachedMesh to false.

3 Likes

Then, is there a function that makes the current scale a reference point 1 like Maya’s “freeze transformations”?
I can’t find the hint about that except for bone :joy:

cc @Cedric for this one.

I think so : Baking Transformations | Babylon.js Documentation

3 Likes

I’m learning again today. Thank you!

2 Likes