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.

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

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.

Search Cell Fracture and enable it.

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

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

Last updated