I am looking for a way to make a water box. By that I mean a cube with no mesh but water on the top like the basic unity water and when your camera enters that box you get the underwater effects and swimming. This is because on a terrain I am making for a game I want multiple lakes on different y axis’s so the normal if your camera is under y 3 you get these camera effects wont work. Please give me any info you have on how to do this because I would really appreciate because I have no idea how to code or program.
Hey,man! Have you completed it? please tell me.I also want to create a water cube in my AR app.thanks.
You would do this by having a trigger zone that’s a cube (or any other shape but usually a cube will work) with no renderer on it and having a script on the trigger zone with an OnTriggerEnter that looks to see if the tag or whatnot of the colliding object is the camera and if so have it turn on a water effects filter on the camera such as distortion, fog, bubbles, sound or whatever else is part of your underwater effects. Then just stick your water plane on the top of the cube and turn off collision on it. For swimming you’d need to code that into your character controller or rigidbody controller - generally less gravity and slower movement, and swimming animation(s) if necessary.