Bounding box bug in 8.22.3

Hi everybody,

There’s a bug since 8.22.3 version. Sometimes, the bounding box of a mesh or an instancemesh is not drawn even if mesh.showBoundingBox = true

Maybe it is due to the modification of the #16996 issue

I cannot reproduce in a PG because i do not know when it works or not but it’s obvious in my code.

Thanks for your answer.

Boris

Hi, see the thread below. Apparently it’s a feature and you need to create an instance of BoundingBoxRenderer

Hi @yedpodtrzitko

Thanks for your answer.

I tried with the last version 8.24.0. There’s no more error in boundingBoxRenderer = scene.getBoundingBoxRenderer()

But the bounding box is still invisible.

It worked perfectly in the 8.22.1.

PS : i use the CDN support

cc @Evgeni_Popov

Would you have a repro link, even if not in the Playground?

Furthermore, my PR did not modify any code related to the rendering of bounding boxes or the scene code related to bounding boxes, only ObjectRenderer (which did not support the rendering of bounding boxes until now, so this new code can’t be the problem), so it is difficult to understand why this could have broken your code…

I added a new method in the bounding box renderer that waits for everything to be ready before continuing. You can try using it and see if that helps

await scene.getBoundingBoxRenderer().whenReadyAsync();

Hi @Evgeni_Popov and thanks for your answer,

Unfortunately, it does not change everything.

I can only show you an animated gif if you want to see the error. I drag a mesh from my library. Wthin the 8.22.1 version, it works perfectly and it does not work until.

version 8.22.1 :

2025-08-26_09h24_16

version 8.22.3 and next :

2025-08-26_09h06_39

The object under the mouse is an instancedMesh but it is the same thing with a mesh

In the second video, you can see in the inspector that the bounding box of the mesh is shown (the square next to the mesh is white) but the bounding box is not drawn.

I’ve seen that there’s a PR by @deltakosh (#16996) in the 8.22.3 concerning the BBox computation. May be there’s a link.

Can you try to call refreshBoundingInfo() in the browser console for the mesh you are going to select, to see if #16996 could be the problem?

Unfortunately, there’s no change… but mesh.showBoundingBox = true

Do you have a live link that we could test? You can send it privately if you don’t want it to be made public.

Ok, I’ve made one link, i’ll send it you privately…

Thanks for the link, I have been able to repro the problem more easily:

Going to work on a fix!

The fix:

Thanks very much !!!

Wait… do you have the same guy on your profile icons?

ahah never noticed, nicely spotted !!!

Captain Caveman’s Team forever !!! :wink:

And, by the way, now it is working perfectly !!! Thank you @Evgeni_Popov