It appears that when using a GizmoManager, that the bounding box gizmo allows drag even if enableDragBehavior
has not been called. Note the doesn’t happen if the BoundingBoxGizmo is created without a GizmoManager. In fact enableDragBehavior doesn’t appear to work at all without a GizmoManager. I just want to disable the ability to drag using the bounding box gizmo as I use my own drag behavior.
cc @Cedric
I’ll take a look in the coming days.
2 Likes
There is the disableMovement
property:
BoundingBox Gizmo Testing | Babylon.js Playground (babylonjs.com)
Is it what you were looking for?
The drag you see with the bounding box is not related to it. It’s part of the gizmomanager (SixDofDragBehavior). That’s why there is no drag by default with the bounding box gizmo.
2 Likes
That’s what I was looking for. Thanks. It doesn’t seem to work in a 4.2.1 PG. Is that expected? Is there anything I can change to get it to work in 4.2.1?
You could try setting the drag behavior’s attach function to an empty definition so that it never gets attached to the mesh. That seems to work even in version 4.2.1
gizmoManager.boundingBoxDragBehavior.attach = () => {};
1 Like