I am making a car game, and it’s free roam. There is a big puddle surrounded by land, but it is up high. I have been looking for a script but it only determines when to activate the fog by the camera’s Y axis. What I need to make it do is when you are UNDER the DaylightWater object, it gives you fog. How do I do this? I am using Unity 4.1.2 latest version.
The easiest way is probably to just give the water body a collider with IsTrigger set to true and then just check not only if the character (who needs a rigidbody) is below a certain y value, but also if he has entered the water (-> OnTriggerEnter()).