> For the complete documentation index, see [llms.txt](https://mindcodeinteractive.gitbook.io/easy-build-system-old/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mindcodeinteractive.gitbook.io/easy-build-system-old/tutorials/advanced-guides.md).

# Advanced Guides

{% hint style="info" %}
New tutorials coming soon for this page! If you notice anything missing or find things confusing, reach out to us on Discord or contact support for assistance.
{% endhint %}

***

## Building Collision Condition

This condition prevents placing a [Building Part](/easy-build-system-old/components/building-part.md) if there's a collision with any of the different objects.

You can enable this condition in the "Conditions Settings" section of your [Building Part](/easy-build-system-old/components/building-part.md) :

<figure><img src="/files/Rfi1n7N3jTORwl0VL26I" alt="" width="563"><figcaption><p>Expand the image to large view by clicking on it.</p></figcaption></figure>

The condition is determined by the "Bounds" model of your [Building Part](/easy-build-system-old/components/building-part.md), located in the 'Model Settings' section. Ensure they are set up correctly. These are generated automatically when you add a new [Building Part](/easy-build-system-old/components/building-part.md), but you can later adjust their size and position to precisely fit your requirements.

<figure><img src="/files/VIO3ZLoUYkRkTeRnDjLB" alt="" width="563"><figcaption><p>Expand the image to large view by clicking on it.</p></figcaption></figure>

When you turn on the condition and your [Building Part](/easy-build-system-old/components/building-part.md) is in the Unity Editor scene, you can use the Gizmos button at the top-right of the editor window. This shows you where collisions are happening in real-time, giving you instant updates on what's going on with your object.

<figure><img src="/files/ZIk8bjKq9QB5WrIsTwEb" alt=""><figcaption><p>Expand the image to large view by clicking on it.</p></figcaption></figure>

In the Building Collision Condition, remember to tick the "Show Gizmos" option. This lets you visualize collisions as they happen in your scene. You can then move your objects around and see how they interact with other objects by trying to make them collide.

{% hint style="warning" %}
It is important that the layer you have defined in your Building Collision Condition matches the one on which you intend to detect the collision.
{% endhint %}

<figure><img src="/files/LMrTpRqyToQIYk1AhNAD" alt=""><figcaption><p>Expand the image to large view by clicking on it.</p></figcaption></figure>

Now that the detection is active, you can choose whether you want collisions to occur.\
By default, collisions with other objects are disabled.

If you want the [Building Part ](/easy-build-system-old/components/building-part.md)colliding a specific surface to be placed, you'll need to check the "Require Building Surfaces" field. Make sure the "Bounds" hit the desired surface during the preview mode, and define your surfaces. You'll find instructions on how to define one further down the page.

<figure><img src="/files/AwITpwpxPHkDYgvpUPOg" alt=""><figcaption><p>Expand the image to large view by clicking on it.</p></figcaption></figure>

If you want placement to occur only upon contact with another [Building Part](/easy-build-system-old/components/building-part.md), you need to check "Require Building Part" and, as mentioned before, ensure that it collides with another [Building Part](/easy-build-system-old/components/building-part.md).

{% hint style="info" %}
For now, it's not possible to choose a specific type of [Building Part](/easy-build-system-old/components/building-part.md) to allow placement only on it, but this feature will be available in a future update.
{% endhint %}

<figure><img src="/files/eG9QbYptKZ651WQcIetS" alt=""><figcaption><p>Expand the image to large view by clicking on it.</p></figcaption></figure>

Here are some additional explanations for each field that you will find in this condition :

<details>

<summary>Building Collision Condition - Fields</summary>

**Building Collision Layers:**

Allows you to define the layers with which your [Building Part](/easy-build-system-old/components/building-part.md) will check for collisions.

**Required Building Part Collision:**&#x20;

This allows the placement of the [Building Parts](/easy-build-system-old/components/building-part.md) only when entering into collision with other [Building Parts](/easy-build-system-old/components/building-part.md) in your scene.

**Required Building Surface Collision:**&#x20;

This allows the placement of the [Building Part](/easy-build-system-old/components/building-part.md) only on one of the surfaces you have predefined here. If none of these surfaces are found, placement will be refused.

**Required Building Surface Tag:**&#x20;

This field allows you to categorize your surfaces using tags. To require collision for permitting the placement, you can simply add a new 'Building Collision Surface' and include its tag in this field.

**Building Collision Tolerance:**&#x20;

Allows you to adjust the collision tolerance. The higher the value, the more precise the collision detection will be, with 1 being the maximum and 0 being the minimum. Adjusting this value will display the bounds in red in your scene, changing size according to the tolerance.

**Show Debugs, Gizmos:**&#x20;

Enables real-time display of the condition's status directly in the Editor. These two fields should be activated during the configuration of your condition, providing you with more information about what's happening in your scene.

</details>

***

## Building Physics Condition

In coming...

***

## Building Terrain Condition

In coming...

***

## Building Linkable Surface

The [Building Linkable Surface](/easy-build-system-old/components/building-linkable-surface.md) component allows you to attach your buildings to a predefined surface in your scene. This means the placed building will be linked to the transform and will move accordingly.

You can add the component to the object you want to attach your [Building Parts](/easy-build-system-old/components/building-part.md) to during runtime. Here's an example below. You need to define a detection bounds, which will detect the [Building Parts](/easy-build-system-old/components/building-part.md) placed within it and then link them to the transform.

<figure><img src="/files/mvbWFyOeTeTshZLz6TA3" alt=""><figcaption><p>Expand the image to large view by clicking on it.</p></figcaption></figure>

Here is an example of what it can look like during runtime:

<figure><img src="/files/JOhXuzawilUw3PdulNWu" alt=""><figcaption><p>Expand the image to large view by clicking on it.</p></figcaption></figure>
