meta data for this page

Collider

To assign a collider on a prefab you need to do following steps:

Open the prefab and select the object you want to equip with a collider.

If you do not know, how you can create a prefab we recommend our tutorial creating prefabs.

Click on Add component.

Type into the displayed text box Collider.

Now choose a collider.

There are two types of colliders.

3D colliders and 2D colliders

We recommend using 3D colliders.

Unity has different 3D colliders:
Box Collider

Does not need much performance

Can be adjusted by clicking on Edit Collider. Then click on the green cube and adjust your collider. If you have finished editing the collider click a second time on Edit Collider to stop editing the collider.

Sphere Collider

A round collider

Mesh collider

Each part of the objets mesh has colission.

If Convex is selected the mesh collider is limited to 255 triangles.

Now you have added a collider component to your object!