Building Engine for Unity3D - Wall removing versus hole

What's a hole ?

Hole is a type of portal, where the shape is an opening from the floor to the ceiling of a room. By design we give it a name based on the width it covers. For example, the portal named holeX1 have a width of 1 unit, minus wallDepth value at the left and minuswallDepth at the right. For a room with a height (floorHeight of the story minus floorDepth of the story) of 3, and a wallDepth of 0.1, a holeX1 portal have this outline list :

x = -0.4, Y = 0

X = -0.4, Y = 3

X = 0.4, Y = 3

X = 0.4, Y = 0

HoleX1 in a room


When removing a wall between rooms, or using a hole with the dimension of the wall, you obtain the same result (however, the portal solution generates more vertices).

Wall removing :

Removing wall vertices

Using a hole portal with the dimension of the wall :

Using portal vertices

Hole can be used to remove a wall in a facade of the building. The removing wall method only works between two rooms :

Hole in a facade

When removing several walls of a room, the builder can remove completly the corners of the room, while it keeps them when trying to achieve the same result with hole.

For example, if we remove the walls of a grid of 9 rooms :

And if we use holes instead (for the room at the center) :

Adding holes in a grid of rooms

Design tips

When you want a non-contiguous succession of walls, use hole.

For example, a incomplete wall between two rooms :

Incomplete wall between two rooms

Or for an isolated wall, use one hole on each side :

Isolated wall

© 2017 Magyc Pixel. All rights reserved | Design by W3layouts