Why are the box full highlighted

image

I hope like this
image

I know the reason, but I don’t know why,
https://playground.babylonjs.com/#1KUJ0A#1436

It looks like issue comes from the call of the AxesViewer (don’t know why though)

Corrected with additional parameter - https://playground.babylonjs.com/#1KUJ0A#1438
let av = new BABYLON.AxesViewer(scene, 3, 0)
the last 0 is responsible for that

1 Like

Is it because of this?

OK! @ZoeLeee , to know why the solution bring by @labris works, you can take a look on the constructor of the API: AxesViewer | Babylon.js Documentation , it’s about the renderingGroupId.

My guess is that by default, all meshes are on renderingGroupId 0, but axesViewer is on RG 2, and that’s why it messes up the highlight calculation (but I still don’t see technically why :dizzy_face:)

2 Likes

Because the stencil and depth are cleared by default between Rendering groups :slight_smile:

1 Like