- Home /
Under water blue fog effects need help please!
Hi guys im new to unity and working on a college project i have been trying to create an underwater fog effects for when you go underwater in my lake. i have written up some code for it in javascript this is it here
the code is perfecty fine no bugs or errors but when i enable fog to the render settings i get it all over the whole terrain when it should be just applying to any part of the terrain below water its really annoying and it would appreciate any help at all This is what is happening right now as you can see the blue undewater fog effect is applying to the whole terrain when it should just be under my lake!
Many thanks!
This is also my code for the effect
pragma strict
var WaterLevel : float; private var isunderwater : boolean; var normalColor : Color; private var underwaterColor : Color;
function Start () { normalColor = new Color (0.5f, 0.5f, 0.5f, 0.5f); underwaterColor = new Color (0.22f, 0.65f, 0.77f, 0.5f); }
function Update () { if((transform.position.y
Your answer
Follow this Question
Related Questions
Underwater - Fog and Skybox 1 Answer
Setting Scroll View Width GUILayout 1 Answer
Underwater effects for rivers 0 Answers
Underwater effect function causing screen flickering 0 Answers
make RenderSettings Fog stay on 1 Answer