Install Asset
Install via Godot
To maintain one source of truth, Godot Asset Library is just a mirror of the old asset library so you can download directly on Godot via the integrated asset library browser
Quick Information
A simple plugin to allow the easy creation and use of destructible objects inside of Godot. Converts a shard mesh into a Node of mesh instances and custom generated collisions shapes, with each shard having its own rigid body. The shards can be generated either in game or before hand. Designed to be used in conjunction with Blenders cell fracture (or any other tool which can generate the required shard mesh). Further clarified in the README.
Godot Destruction Plugin CSharp
Used in conjuction with shard meshes to easily create destructable objects.
Requires Godot Mono.
Usage
- Install the Cell Fracture addon in Blender, join your mesh and use F3 to search for Cell Fracture. Set the Source Limit to how many RigidBodies you want in your game. (~5 – 50)
- Select everything, right click and select
Set Origin > Origin to Center of Mass (Volume)
. - Export it as a .ojb or GLTF, import it in Godot as a scene and create an instance of this scene.
- Install and enable the Destructibles plugin from the asset library. (You may have to click build in the top right corner if you get errors, while trying to enable it; or under
project > tools > C# > press Create C# Solution
) - Add a Destruction node to the intact scene and set the
Fragmented
scene to the fragmented scene. - Set the
Shard Container
to the node the fragmented objects will be added to at runtime or leave it empty. - Call Destroy(explosionPower: int) to destroy the object. (Explosion power parameter can be left blank to use the default value)
Options
Under the generation tab there are various options which affect both pre-generated and dynamically generated shards. Such options are listed below along with a short explanation:
Preload shards
which as the name suggests loads the shard scene at ready instead of when theDestroy
function is called.Simplify collision mesh
which at the cost of time and processing power simplifies the shard meshes collision shapes which can drastically improve performance in instances with large quantites of shards.Clean collision mesh
is reccomended to be enabled as it doesn't cause much of a performance impact and removes duplicate and interior vertices which aren't needed.ParticleFade
when enabled causes the fade affect to appear spotted such as particles or dust. When disabled uses a clean fade.
Optimizations
In order to increase framerate and the quantity of objects that can be used at once, it's reccomened to pre-generate your shards. By doing this you:
- A: Reduce stutter caused by shard generation
- B:Can enable
Simplify Collision Mesh
which drastically increases performance, at the cost of taking longer to generate; which is negated by pre-generating the shards.
Pre-generation usage
- Configure destruction node first by following the
Usage
steps. - Go down to
Generation
and select a path to store your generated shard scene under "save path" - Click generate mesh (Checkbox that acts as a button) and wait for it to place a new shard scene at your desired location
- There are various options you can enable or disable listed above, simplify collision mesh and clean collision mesh have to be enabled BEFORE generation, in order for use with pre-generated meshes.
- The final step is selecting your new shard mesh scene under "Pre generated shards"
You are now done, when you next run your game / program it will be using the pregenerated meshes improving latency, and stutter, along with performance if simplify mesh is enabled.
A simple plugin to allow the easy creation and use of destructible objects inside of Godot. Converts a shard mesh into a Node of mesh instances and custom generated collisions shapes, with each shard having its own rigid body. The shards can be generated either in game or before hand. Designed to be used in conjunction with Blenders cell fracture (or any other tool which can generate the required shard mesh). Further clarified in the README.
Reviews
Quick Information
A simple plugin to allow the easy creation and use of destructible objects inside of Godot. Converts a shard mesh into a Node of mesh instances and custom generated collisions shapes, with each shard having its own rigid body. The shards can be generated either in game or before hand. Designed to be used in conjunction with Blenders cell fracture (or any other tool which can generate the required shard mesh). Further clarified in the README.