Bypass rendering order?

for instance, if i have mesh_1 and mesh_2 with renderingGroupId = 0 (they render based on camera distance), and mesh_3 with renderingGroupId = 1, is there a way to modify mesh_2 so it renders based on camera distance with mesh_1 but always in front of mesh_3? i’d want mesh_3 to always be in front of mesh_1 too. thanks!

This is a bit advanced but you can have all of them in the same rendering group and then define your own sorting function:

Scene | Babylon.js Documentation

This is something you want to call at the scene level:

scene.setRenderingOrder(0, ...
1 Like