- Home /
underwater effect
How do I get a underwater effect? I can create water but just nothing happens underneath it ...
Answer by oliver-jones · Nov 29, 2010 at 02:21 PM
Well because the water is a plane - its means its just a 2D object. So what a lot of games designers do - including me, is have a camera effects as soon so your character goes under the water. Of course that effects will be blurred vision and trickles (of some sort).
So basically you want something that says: If character goes below -20 - then character is in water:
static var InWater == false;
if(transform.position.y < -20) { InWater = true; }
Then with that variable being true you can activate the camera effects with it.
What happens when you have an area under -20, but with no water? I tried this my self. Really bad idea but its a good start :/
Well in that case - for ease, you could place a collider box where your water is - and do an OnTriggerEnter = InWater (but have the collider a trigger - and stretch it further than your actual water)
Answer by Silvia · Nov 29, 2010 at 10:50 AM
I am not an expert, but try checking the demo project called "Tropical paradise". In this application, you get some sort of faded effect when diving underwater, so maybe it can help you.
Your answer
Follow this Question
Related Questions
need water 1 Answer
Underwater effect when entering down a slope 1 Answer
Make a water effect 1 Answer
Subnautica like underwater effect / rays 0 Answers
2D water shader effect 1 Answer