I have implemented the diamond square algorithm to generated a simple terrain. Next, I’d like a plane of water which ends at the bounds of the terrain is is centred with the terrain.
Essentially, I want my plane of water to stretch to each edge of my terrain (the terrain forms a square). Here’s a screenshot of my terrain:
I know unity has a water prefab but I want a water plane that can have its position and bounds programmatically set once the terrain has been generated.
How can I do this?