Checking if mesh/ several meshes are airtight

In my game there is a building system for building custom spaceships (3d) from 1x1 panels. How do I check, when the player has completed the build, whether the hull is airtight? Some of my (stupid) ideas include using a light source in the spaceship, a perfectly reflective wall material, and something to sense light outside the spaceship, but that seems very hard to implement.

1 Like

Maybe using a Boolean
Each step the player finish you can set a bool value and then check it has finished
Or you can also save the game to check later
You can do a lot of things

For the material you can create a emissive material then apply it to a sphere inside the spaceship and change the sphere scale with a timeline and also increasing the emissive value


Could you provide an example of the interior? Or elaborate on the complexity of such enclosed space? How wild are players allowed to go? Minecraft wild?


A brute force method could involve tracing - either from inside out or vice versa. But this may be insufficient / inefficient depending on the scope / topology.

Another brute force method that comes to mind is Flood Fill:

Replying to Everynone. Check out Hard Sci-fi series The Expanse. That’s the inspiration for ships. Efficiency doesn’t matter, as it’s only going to run once per taken hit or when it is built. Flood fill sounds good, though I can’t even think of how to start implementing it…