# Add breakable (Destructible) objects

Platformer Engine provides several examples of how to use destructible objects. By attaching Destructible.cs to an object with a collider, you can destroy that object, play an audio clip, and spawn loot inside if desired.

<figure><img src="https://3354093558-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fm5GkwnS5cA2kcSiFkUOB%2Fuploads%2FAoqD93s7bs5sI2wstjxD%2Fimage.png?alt=media&#x26;token=0a31ecff-2304-4c08-9e67-eb0c07c24cd2" alt=""><figcaption></figcaption></figure>

Now, for the destroyed object, you would like to attach an object that has broken pieces in it. See the following image:

<figure><img src="https://3354093558-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fm5GkwnS5cA2kcSiFkUOB%2Fuploads%2FYh1X96Ai2JZcKQD4S3Nw%2Fimage.png?alt=media&#x26;token=310d0457-5afb-4058-a494-37863a14c3ca" alt=""><figcaption></figcaption></figure>

Do not forget to attach a collider ( Simple box collider will work fine ) and a rigidbody to each of the broken pieces of your destructible for the physics to work properly.

But… How can I destroy my model into different pieces? ( This approach is for 2.5D Games )

This example was made using Blender. Blender offers an add-on called Cell Fracture for this. Of course, you can use any other add-on you like.

To enable Cell Fracture go to Blender´s preferences ( edit/ preferences ), and then click on Add-ons.

<figure><img src="https://content.gitbook.com/content/m5GkwnS5cA2kcSiFkUOB/blobs/QsbRgJggxvm2PuIkZpeF/image.png" alt=""><figcaption></figcaption></figure>

Search Cell Fracture and enable it.

<figure><img src="https://content.gitbook.com/content/m5GkwnS5cA2kcSiFkUOB/blobs/UMkALVVVtj7AN21ai0V5/image.png" alt=""><figcaption></figcaption></figure>

In object mode, select your model and follow the path: Object/QuickEffects/CellFracture. The next window will pop up

<figure><img src="https://content.gitbook.com/content/m5GkwnS5cA2kcSiFkUOB/blobs/drjlTY8OxYXVf5qt7a1L/image.png" alt=""><figcaption></figcaption></figure>

Here, you can customize the fracture as much as you want. Once you are happy, click Ok. Here is the result!

<figure><img src="https://content.gitbook.com/content/m5GkwnS5cA2kcSiFkUOB/blobs/P5C9UUWKM4kVX1DGqctl/image.png" alt=""><figcaption></figcaption></figure>
