Rendering order meshes

I’m looking for a way to draw meshes (that are further away from the camera) in front of everyone.
(like on second sphere)

But when you turn rotate, these meshes and lines should be hidden behind the sphere, but this does not happen.

Should you help? Thanks!

Well this is expected as RenderingGroupId will force the meshes to be rendered after but with still the same depth buffer.

maybe you can do something like that:

1 Like

Yes, it is that what i looking for! Thanks!

customMesh.material = new BABYLON.StandardMaterial();
customMesh.material.depthFunction = BABYLON.Engine.ALWAYS;
1 Like