I have quite a complex issue. My map is made out of thousands of parts and I use Raycasting to check if there’s a part in both X and both Z directions from the part. This system works well, apart from one issue:
I provide an image to better understand this problem:
In case number 1, there’re other parts surrounding the part from all sides, so it returns false (because there are no empty spaces), as expected.
In case number 2, there’re open spots in multiple directions, so it returns true (because there are empty spaces), as expected.
The case number 3 is the problem: my Raycasts detect parts from all sides, so it returns false (because it thinks there are no empty spaces), but it’s expected to return true (because the part is not fully surrounded).
I have no idea how to fix the issue (the case number 3). Any help will be gladly appreciated!
I have a huge map of the world, made up of ~32,000 rectangular parts. I need to check whether a part has “sea access” (the issue that I’m dealing with right now) and assign a boolean value at the server setup - once.