Unity Fog Script for a Certain level

I am making water for my level and I was hoping anyone had a script that when the Camera went under, say, 47.7 on the Y axis, it would change to a thick blue-sh fog to simulate that you are underwater,

Many Thanks,

-Will

If there’s one thing I know about Unity Answers, it’s that it doesn’t like when you ask people to make the game for you.

Something that you really need to succeed in Game Dev is how to tackle a problem.

  1. What effect do you want to achieve?
  2. Break down the effect into pieces that you can tackle individually.
  3. Do the fun bit ;).

For your fog, a simple work around would be to have a semi-transparent blue material appear over the camera when transform.position.y <= 47.7f.