Its there any way to remove the scaling feature from the Gizmo manager bounding box?

Hi all

I would like to remove all the cubed edges from the bounding box feature to prevent it from scaling.

var gizmoManager = new BABYLON.GizmoManager(scene);
Im trying to figure it out through the
console.log(gizmoManager.gizmos.boundingBoxGizmo);
I haven’t found anything related to scaling.
Here is a playground to start with Babylon.js Playground
Any idea?

Hi @mathus1

Try this:

var gizmoManager = new BABYLON.GizmoManager(scene);
gizmoManager.boundingBoxGizmoEnabled=true;
gizmoManager.gizmos.boundingBoxGizmo.setEnabledScaling(false); 

And if you don’t want the “rotate-while-drag”-behavoir, use:
gizmoManager.boundingBoxDragBehavior.rotateDraggedObject = false;

Also consider a look into the docs :wink::

https://doc.babylonjs.com/api/classes/babylon.boundingboxgizmo#setenabledscaling

2 Likes

It worked. I appreciate your help