Hello. I created a pickaxe that can destroy the terrain - fillball… Enum. Material. Air…
The problem is that it can also destroy water, as it is also terrain.
But I didn’t find any function that could ignore water for FillBlock, fillball, and fillregion.
Is there such a function?
https://developer.roblox.com/en-us/api-reference/function/Terrain/ReadVoxels
You can read the terrain’s voxels and detect for any water blocks. If no water blocks are present in the scanned terrain then perform the conversion of terrain into air block if one or more water blocks is present in the scanned terrain then don’t perform the conversion of terrain into air blocks.
Yes, that is certainly the solution , I just need to understand the terrain voxels reading.
In the example is the local region = region. New(0,0,-15), vecto3. New (4,8,4)) 0,0,-15 is position and 4,8,4 is the size, if I understand correctly. Expandtogrid(4) aligns the position into the grid. 4 is the size of the grid. 1 voxel 4,4,4
If anything, correct me. Others I still have to understand and try.