Building system

I am trying to figure out a way to make a building system to check if a room is fully enclosed or if there are holes for weather to get in any help would be great

Are you using ‘Snapping’ and Snapping Points to ensure Parts fit with no gaps?

You could do a grid of line traces that covers the building dimension with a set density.
The grid 2d macro can help out with the spacing.

You would need to do this test from all sides of the building (you could probably skip the floor)

Roof parts could have component tags = “Roof”
North walls would have “North”
etc. You could test if the hits from a certain direction only match the needed tags.
If there is any furniture or interior walls / doors hit then you can mark the side of the building as having a hole.

If rays from the roof hit any components with the tag floor => you have a hole in your roof.

Yes i am

Would this work for non-static builds such as vehicles i.e a submarine

Yes it should work. I used a similar method for dynamic room generation. Just make sure add the actor position to the grid 2d position to do the line traces relative to the submarine.

You could get the grid dimensions from either the subs bounding box or if you are freshly placing wall panels the set a specific extent of the floor segment + expected height.

There are many ways to create a building system and its tough to really know what the problem is without a visual. Is the Room a single mesh or constructed from parts? When you say “Holes” are you referring to Windows/Doors/Other pre-created Openings?

You could simply name the part or parts with names that you search specific substrings for and know if it has holes instantly. For example, a part is named 'WallSolid" search for substring “Solid” and you know that part does not have openings. A part named “WallWithHole” search for substring “Hole” and you know it does have one or more openings. If you don’t want to filter on the part name itself, then use tags.

You could also do a voxel test of sorts from the vehicle center expanding a box trace from the center of the vehicle to it’s edges (probably best done asynchronously is possible). If the box trace “escapes” from the vehicle and hit the outer volume then there is a hole.