# Problem with Bounding Box Gizmo

**URL:** https://forum.babylonjs.com/t/problem-with-bounding-box-gizmo/55897
**Category:** Questions
**Created:** [January 10, 2025, 9:04pm UTC](https://forum.babylonjs.com/t/problem-with-bounding-box-gizmo/55897 "2025-01-10T21:04:00Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![TiagoSilvaPereira](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tiagosilvapereira/32/25835_2.png) [@TiagoSilvaPereira](https://forum.babylonjs.com/u/TiagoSilvaPereira)
#### Post date: [January 10, 2025, 9:04pm UTC](https://forum.babylonjs.com/t/problem-with-bounding-box-gizmo/55897/1 "2025-01-10T21:04:00Z")

</div>

Hi everyone, I hope you all are well!

I’m facing a strange issue using the gizmo manager and the bounding box gizmo. When I enable it, it shows only the box, but not the controls to scale, etc, as you can see in the following video:

I’m using BabylonJS 5.57.1, and the code to enable the gizmo is as simple as:

```js
this.gizmoManager.boundingBoxGizmoEnabled = true;

```

I’m also following this playground here:

> **[Babylon.js Playground](https://playground.babylonjs.com/#4TBMBR%2333)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL and WebGPU 3D scenes

I also tried the following options without success:

```js
const utilityLayer = new BABYLON.UtilityLayerRenderer(this.scene);
this.gizmoManager.gizmos.boundingBoxGizmo.utilityLayer = utilityLayer;

this.gizmoManager.gizmos.boundingBoxGizmo.setEnabledScaling(true);

```

---

<div class="post-metadata">

### Author: ![ryantrem](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ryantrem/32/34010_2.png) [@ryantrem](https://forum.babylonjs.com/u/ryantrem)
#### Post date: [January 10, 2025, 9:29pm UTC](https://forum.babylonjs.com/t/problem-with-bounding-box-gizmo/55897/2 "2025-01-10T21:29:18Z")

</div>

5.57.1 is pretty old, but it doesn’t seem like the issue repros even in an old Playground:

> **[Babylon.js Playground](https://playground.babylonjs.com/?version=5.57.1#4TBMBR%2333)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL and WebGPU 3D scenes

I assume you are not able to repro this in any Playground?

@Cedric

---

<div class="post-metadata">

### Author: ![TiagoSilvaPereira](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tiagosilvapereira/32/25835_2.png) [@TiagoSilvaPereira](https://forum.babylonjs.com/u/TiagoSilvaPereira)
#### Post date: [January 11, 2025, 12:52pm UTC](https://forum.babylonjs.com/t/problem-with-bounding-box-gizmo/55897/3 "2025-01-11T12:52:19Z")

</div>

Hi @ryantrem, thank you for responding. I tried upgrading to Babylon 7.43, but the issue persists. I tried to reproduce the issue on Playground, but without success (I’m basically doing the same as the Playground).

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/8/4/84cb8269b870ffb0c8aa680db5768622579bf3b5.jpeg)

---

<div class="post-metadata">

### Author: ![Dad72](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dad72/32/13_2.png) [@Dad72](https://forum.babylonjs.com/u/Dad72)
#### Post date: [January 12, 2025, 9:00pm UTC](https://forum.babylonjs.com/t/problem-with-bounding-box-gizmo/55897/4 "2025-01-12T21:00:44Z")

</div>

Try something like that. This should work

```auto
const utilityLayer = new BABYLON.UtilityLayerRenderer(this.scene);
utilityLayer.setRenderCamera(this.scene.activeCameras[0]);
utilityLayer.utilityLayerScene.autoClearDepthAndStencil = false;

this.boundingBoxGizmo = new BABYLON.BoundingBoxGizmo(BABYLON.Color3.FromHexString("#0984e3"), utilityLayer);    
this.boundingBoxGizmo.attachedMesh = meshToAttach;

```

---

<div class="post-metadata">

### Author: ![Lemcat](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/lemcat/32/44469_2.png) [@Lemcat](https://forum.babylonjs.com/u/Lemcat)
#### Post date: [January 12, 2025, 9:38pm UTC](https://forum.babylonjs.com/t/problem-with-bounding-box-gizmo/55897/5 "2025-01-12T21:38:50Z")

</div>

> [@TiagoSilvaPereira](#):
>
> I tried to reproduce the issue on Playground, but without success (I’m basically doing the same as the Playground).

Do you use ES6-tree shaking? Maybe you missed some import? But I think in this case it will not work at all 😃

---

<div class="post-metadata">

### Author: ![TiagoSilvaPereira](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tiagosilvapereira/32/25835_2.png) [@TiagoSilvaPereira](https://forum.babylonjs.com/u/TiagoSilvaPereira)
#### Post date: [January 14, 2025, 3:32pm UTC](https://forum.babylonjs.com/t/problem-with-bounding-box-gizmo/55897/6 "2025-01-14T15:32:50Z")

</div>

Hi everyone,

@Dad72 @Lemcat thank you for responding

I just noticed that the problem is not that the controls are not appearing, but that they are very small.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/7/6/76429d56c9b7b9ccebfcc14b1890f610e4775027.jpeg)

I managed to reproduce this in a Playground. It seems the problem is my scene scaling (objects are big, and the camera is far from the scene center):

> **[Babylon.js Playground](https://playground.babylonjs.com/#MUUEB1)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL and WebGPU 3D scenes

Is there any way to keep the size of the controls, even if my camera is far from the object and the object is big, like in this playground?

**EDIT:** I just found the solution in the docs: [Babylon.js docs](https://doc.babylonjs.com/typedoc/classes/BABYLON.BoundingBoxGizmo#scaleboxsize)

Unfortunately, scaling all the objects and scenes would be very difficult. Hundreds of models are in an application about 6 years old, with dozens of thousands of scene data saved to a database, etc.

So, if there is any way to increase the controls directly in the code, that would be extremely useful.

Thanks in advance for everyone’s help!

---

<div class="post-metadata">

### Author: ![TiagoSilvaPereira](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tiagosilvapereira/32/25835_2.png) [@TiagoSilvaPereira](https://forum.babylonjs.com/u/TiagoSilvaPereira)
#### Post date: [January 14, 2025, 3:46pm UTC](https://forum.babylonjs.com/t/problem-with-bounding-box-gizmo/55897/7 "2025-01-14T15:46:03Z")

</div>

I just found this on the API docs, sorry for bothering you all:

```js
this.gizmoManager.gizmos.boundingBoxGizmo.scaleBoxSize = 10;

```
