Detect if camera is below a material (in material expression)

I’m trying to increase the opacity of my water surface when the player ducks below the surface.

Any ideas on which nodes can help achieve this?


subtract the CameraWorldPosition Blue component from the WorldPosition Blue component and you’ll get how far below the camera is from the water :slight_smile:

Awesome, thanks for the help @Chosker. I’ll give that a shot.