# How to show the selected mesh in different color instead of bounding box in babylonjs

**URL:** <https://forum.babylonjs.com/t/how-to-show-the-selected-mesh-in-different-color-instead-of-bounding-box-in-babylonjs/13964>\
**Category:** Questions\
**Created:** [September 7, 2020, 5:46am UTC](https://forum.babylonjs.com/t/how-to-show-the-selected-mesh-in-different-color-instead-of-bounding-box-in-babylonjs/13964 "2020-09-07T05:46:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dineshax100](https://avatars.discourse-cdn.com/v4/letter/d/f4b2a3/32.png) [@dineshax100](https://forum.babylonjs.com/u/dineshax100)\
**Post date:** [September 7, 2020, 5:46am UTC](https://forum.babylonjs.com/t/how-to-show-the-selected-mesh-in-different-color-instead-of-bounding-box-in-babylonjs/13964/1 "2020-09-07T05:46:46Z")

</div>

Hi,

As shown in the PG  
[https://playground.babylonjs.com/#TC2K69#4](https://playground.babylonjs.com/#TC2K69#4)  
How to show the select mesh in different color instead of bounding box in babylonjs. i.e In the Scene Explorer: Scene\>\> Nodes\>\>box-1, after select the bounding box, instead of the boxing the selected mesh, Can we select the mesh with different color?

Thanks

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [September 7, 2020, 7:48am UTC](https://forum.babylonjs.com/t/how-to-show-the-selected-mesh-in-different-color-instead-of-bounding-box-in-babylonjs/13964/2 "2020-09-07T07:48:54Z")

</div>

I do not think I understand your issue cause it looks like your PG is doing exactly what you ask ? it changes color of the picked mesh ?

---

<div class="post-metadata">

**Author:** ![dineshax100](https://avatars.discourse-cdn.com/v4/letter/d/f4b2a3/32.png) [@dineshax100](https://forum.babylonjs.com/u/dineshax100)\
**Post date:** [September 7, 2020, 7:56am UTC](https://forum.babylonjs.com/t/how-to-show-the-selected-mesh-in-different-color-instead-of-bounding-box-in-babylonjs/13964/3 "2020-09-07T07:56:06Z")

</div>

Hi,

In the below attached image, On click of “Red” box, the mesh is selected with bounding box. We need, change in color of the mesh(i.e pickInfo.pickedMesh.material.diffuseColor = BABYLON.Color3.Green()), instead of bounding box.We no need to show the bounding box.

Thanks

 ![BoundingBox](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/b/ba8a61e83e46314a4bea315f23bb29cd8385ad4a.png)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [September 7, 2020, 8:22am UTC](https://forum.babylonjs.com/t/how-to-show-the-selected-mesh-in-different-color-instead-of-bounding-box-in-babylonjs/13964/4 "2020-09-07T08:22:25Z")

</div>

You can not change this as this is the behavior of the inspector and the button is meant to display the bounding box.

You would need to create your own control for this.

---

<div class="post-metadata">

**Author:** ![dineshax100](https://avatars.discourse-cdn.com/v4/letter/d/f4b2a3/32.png) [@dineshax100](https://forum.babylonjs.com/u/dineshax100)\
**Post date:** [September 7, 2020, 8:27am UTC](https://forum.babylonjs.com/t/how-to-show-the-selected-mesh-in-different-color-instead-of-bounding-box-in-babylonjs/13964/5 "2020-09-07T08:27:56Z")

</div>

ok.

Thanks

---

<div class="post-metadata">

**Author:** ![dineshax100](https://avatars.discourse-cdn.com/v4/letter/d/f4b2a3/32.png) [@dineshax100](https://forum.babylonjs.com/u/dineshax100)\
**Post date:** [September 7, 2020, 8:29am UTC](https://forum.babylonjs.com/t/how-to-show-the-selected-mesh-in-different-color-instead-of-bounding-box-in-babylonjs/13964/6 "2020-09-07T08:29:02Z")

</div>

Is it possible to hide the bounding box in Scene Explore?

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [September 7, 2020, 8:30am UTC](https://forum.babylonjs.com/t/how-to-show-the-selected-mesh-in-different-color-instead-of-bounding-box-in-babylonjs/13964/7 "2020-09-07T08:30:06Z")

</div>

nope, this is not customizable from the configuration. May I ask a bit more about the use case ?

---

<div class="post-metadata">

**Author:** ![dineshax100](https://avatars.discourse-cdn.com/v4/letter/d/f4b2a3/32.png) [@dineshax100](https://forum.babylonjs.com/u/dineshax100)\
**Post date:** [September 7, 2020, 8:47am UTC](https://forum.babylonjs.com/t/how-to-show-the-selected-mesh-in-different-color-instead-of-bounding-box-in-babylonjs/13964/8 "2020-09-07T08:47:08Z")

</div>

Ya sure.  
On selection of mesh, need to show the different color and pass the info to other page/section of page.

Can you say the event handler name on bounding box select and deselect event and is it possible to add our information to the handler?

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [September 7, 2020, 9:49am UTC](https://forum.babylonjs.com/t/how-to-show-the-selected-mesh-in-different-color-instead-of-bounding-box-in-babylonjs/13964/9 "2020-09-07T09:49:52Z")

</div>

In this case why not creating your own UI ? This might be way easier ?
