When filling map with water using Terrain:FillBlock() water cuts through all the terrain

  1. What do you want to achieve? Keep it simple and clear!
    I am working on a procedural world generation script, but I have encountered a problem with water

  2. What is the issue? Include screenshots / videos if possible!
    I was working on adding the water and I noticed that the water cuts completely through all the terrain. You can swim under islands because of this.

I am using Terrain:FillBlock which has no ignore water feature or anything. Is there any way around this? I create the water first and terrain second so really the terrain should work fine but it still gets cut.

Heres a picture of what is happening.
https://gyazo.com/be8b9ada09717fed995b4f3a014dc01a

Heres my code for the water creation, its real simple.
https://codeshare.io/5PDJvP
Its a codeshare because honestly putting code in here really confuses me. I can only get certain lines to become code.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I havent tried anything honestly because I have no idea how id even go about fixing this. It sounds like an internal engine problem so there isnt anything I can do most likely so I have come to the forum to ask for help :slight_smile:
2 Likes

Generate the water first. The water is technically the bounds of the map as well as the fundamental element of a terrain based map. After the water generates, generate the land. The land will overwrite water terrain and prevent water from cutting anything.

I’m assuming you’re not generating the water first mainly because there’s a lack of code. If you’re already doing this and are encountering the problem, then it’s worth another look at a solution.

3 Likes

I added more of the code. I do generate the water first but it still cuts. I think :FillBlock doesnt ignore water, so when you try to fill a block that is submerged it just doesnt do anything.

1 Like