Occlusion effect used on one mesh effects bounding box of another mesh

Hi all! I’ve discovered an interesting but strange bug recently. Not sure what to make it of it really. In my program, I use a method to highlight the outline of an object when it is occluded but i’ve recently taken notice that when that object is occluded and the outline effect is added it also triggers what looks to be the built-in occlusion highlight effect of babylon’s bounding box on a completely different object! Not sure why that might be happening as they are two separate objects all together.

Have re-created the bug in this PG: Babylon.js Playground

Would love to hear what you you guys make of this.

Hey there, I think setting disableBoundingBoxesFromEffectLayer to true on the highlight layer is what you’re after. :slight_smile:

PS, I don’t think it’s a bug that the flag’s needed to exclude the bounding box here, but not super sure… CC @sebavan for confirmation. :slight_smile:

Hey @Blake thanks so much. Setting that flag to true did the trick. I actually wasn’t sure if this was a bug in the framework or an error on my part so I posted here and in the questions category but seeing that there was a pre-existing flag means it should’ve have just been posted as a question to begin with. Will try take a harder look at the docs next time.