Quick Setup Guide


  1. Explore Examples: Check out the demo scenes in Assets/BoxCutter/DemoScene/Scene to see BoxCutter in action.
  2. Add Manager: Drag the BoxCutterManagers prefab into your scene. The prefab contains all of the managers inside of it.
  3. Make Objects Destructible: Add BoxObj components to the GameObjects you want to fragment. (These GameObjects should be the matching .vox models.) Import your MagicaVoxel .vox files and assign them to the magicaVoxelData field.
  4. Create Destruction Trigger: Add a BoxCutterCaller component to an empty GameObject. This will serve as your destruction event trigger.
  5. Configure Fragmentation: Customize destruction behavior using FragSettings to control fragment patterns, sizes, and physics properties.

Be sure to adjust the manager’s settings in particular

  1. Enable ignoreDiagonalsInIsland if you want BoxCutter to consider diagonal connections when identifying voxel islands or groups. In the left image, the setting is turned off, resulting in two separate groups (indicated by different colors). In the right image, the setting is on, and both voxels share the same color, showing they belong to a single group.

Dia.png

NoDiag.png

  1. Enable canReturnDebris and canReturnFallenIsland to have generated debris automatically removed over time. canReturnDebris handles the smaller fragments created during fragmentation, while canReturnFallenIsland removes the larger chunks.

Note: If your project includes other voxel importer plugins (such as Voxel Toolkit: MagicaVoxel Importer & Optimizer or Voxel Importer), you should import the "BCVoxImporter" package located at BoxCutter\Editor\Scripts. This package replaces the default importer with one that only handles .bcvox files, preventing conflicts with your existing voxel plugins.

To use this workflow, rename your .vox files to .bcvox before importing them.

Connection States


BoxCutter uses three physics states to simulate structural behavior:

Disconnected