Auto cell block

Updated on July 27, 2022

This feature blocks cells by marking the cell as used. This in turn gives some freedom when building grids around other objects like rocks or cliffs. It also has the innate ability to create the cells in any shape you like, such as a layout of a house, town, ship, or any other design you choose.

It can block cells checking for objects on or above the grid.

It also can check to see if there is anything underneath the grid.

You can of course have the choice of prefabs to place or not place in both instances.

A very simple design using a chequered grid with Auto Cell Block on with two prefabs for placeable objects and one prefab for the blocked cells(above). Note the pool and cliff face have no generated cells even though the grid covers them.

Auto cell blocking

Turns the auto cell blocking feature on or off.

Block type

This allows you to choose what to block, objects above the grid, void beneath the grid, or both in combination.

Ground layer

The ground layer is the layer your actual terrain or ground objects will have to be on for this feature to work. Objects that are being blocked above the grid can be on any layer. For removing cells if there is a void, the terrain will need to be on this assigned layer. This is an integer that represents the layer. See Unity documentation about creating a new layer and adding your objects.

Ground distance

The ground distance is how far the below rays check to find the ground. The rays should always be going just past the ground to work properly. See Show Below Rays to make this easier.

Above check box size

This increases the size of the box created from the centre of each cell. The larger you create this box, the more removed cells or space around the collision objects you will have. See Show Above Box Colliders to get a better understanding of how this is working.

Above check box height

This will do alter the Y value of the checkBox and find objects higher and lower. If you have bridges and would like to remove the cells underneath them, increasing this value may help. Again checking Show Above Box Colliders would help see how this is being applied.

Show above box colliders

This just gives a visual representation of the box colliders created from the centre of each cell.

Show below rays

Shows the rays created from each cell point. They should intersect the ground layer geometry slightly.

Check ground hits

Checking this will give you a debug.log of all the distances of all the points in the grid. Most commonly the log with the most same hits will determine the distance between the grid, and the largest flattest part of your terrain. You can increase this value slightly and then use it for your Ground Distance.

Quite clearly here the grid is set 0.018 metres above the object in the Ground Layer.
So perhaps a value of 0.02 could be used as the Ground Distance.

Still need help? Contact support at support@golemitegames.com

Please describe your issue in detail and if possible, provide screenshots to help us understand your problem better and answer your question more effectively.