Hello community,
I want to render an object (particles) only if they are behind an specific object. For example: I want to render bubbles in a liquid. The bubbles should be only visible if they are behind (or within) the “liquid mesh”. I don’t want to see the bubbles if I’m looking from the top through the liquid-surface (liquid-surface and liquid-mesh are different objects/materials in my scene). I’m well aware of the ZTest GEqual, but if I’m using this, the bubbles will be visible from everywhere. Therefore I adjusted the RenderQueue of some other objects. The renderqueue of my liquid surface is now 3100 and the renderqueue of the bubbles is 2500. Unfortunately if I’m looking from a specific angle (the camera is under the water-level) the surface is rendered in front of the bubbles.
Is there anyone out there who can point me in the right direction?
Help is very appreciated!