Ok, it is behaving a bit weird. I have created a short video for the BJS guys:
https://babylonjs.nascor.tech/v.mkv
Will you please post a link to this topic into the Bugs section?
However here is a working version, just set the renderingGroupId
, lines 45 and 74, to force the rendering order:
https://playground.babylonjs.com/#DT7AQC#23
EDIT: if you don’t want to reveal your code, strip it to the bare minimum as I did with your PG