How can i get the correct scaling and rotation with boundingBoxGizmo?

I resolve the above situation.But it is invalid when i use boundingBoxGizmo and the mesh with -1 scale.

If i set the mesh rotation manually,then i add boundingBoxGizmo.It will change the mesh rotation to another one that with same result.But if i have an UI pane to control the mesh rotation,it’s wrong now.
When i drag the scale box or rotation sphere,it has same problem too.

If we need to distinguish positive and negative scale?I think that we needs.

Hello :slight_smile: If I may ask, why do you need to set your mesh’s scale by -1?

1 Like

I import an gltf mesh,it will be set z scale -1.

Negative scale is unusual.But we don’t stipulate scale should be positive,so i think that we should distinguish positive and negative scale that all scenarios have correct results.

I think building a custom bounding box gizmo would be better in this situation if you need to ensure the scale stays with the same sign.

I’m working on a fix.

PR New flag to preserve scaling when using gizmos by CedricGuillemet · Pull Request #12385 · BabylonJS/Babylon.js · GitHub

1 Like