# Collision Physics

Each separable part of a Fragment must have an associated collision object in order for physics to work. This means each bone with `Use Physics` enabled should also have a collision object linked to it.

### Rigging Collisions

You link collisions to bones the same way you link Drawable Models to bones as described in [Drawables (.ydr) > Rigging](https://docs.sollumz.org/drawables.ydr/rigging#linking-bones-to-drawable-models).

<div align="left"><figure><img src="https://4252508569-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcRAM9lBHCqq3QodZ420I%2Fuploads%2FaIKD6lYIcnlWPahm4ZL9%2Fimage.png?alt=media&#x26;token=1cdb1e29-34ea-4407-9aac-d77e40a6f70d" alt=""><figcaption><p>Collision object linked to bone via a Child Of constraint</p></figcaption></figure></div>

### Setting Mass

Each collision object under a Fragment also has a Physics subpanel where you can define its mass.

<div align="left"><figure><img src="https://4252508569-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcRAM9lBHCqq3QodZ420I%2Fuploads%2FuQrUD9t5HRtKO1K9FNAG%2Fimage.png?alt=media&#x26;token=0324be4c-468e-4cde-89bd-92dfe8107900" alt=""><figcaption><p>Object Properties > Sollumz > Physics</p></figcaption></figure></div>

#### Auto Mass Tool

There is also a tool for automatically calculating mass based on the collision material's density and the object's volume. Navigate to `Sollumz Tools > Fragment > Set Mass`. There you will find the `Calculate Collision Mass tool`.

<div align="left"><figure><img src="https://4252508569-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcRAM9lBHCqq3QodZ420I%2Fuploads%2FGmFZ4EuOuWY14bPDr48p%2Fimage.png?alt=media&#x26;token=4ef8eb08-7e63-48c6-ae2b-e175fe99be5c" alt=""><figcaption><p>Sollumz Tools > Fragment > Set Mass</p></figcaption></figure></div>

In order for this tool to work, the collision object must have a collision material added.

### Volume and Inertia

Volume and Inertia are essential physics properties for collisions. You can find these options under `Object Properties > Sollumz`.

<div align="left"><figure><img src="https://4252508569-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcRAM9lBHCqq3QodZ420I%2Fuploads%2F4n7LIhxaWX8Z5KdP70sM%2Fimage.png?alt=media&#x26;token=18e10877-d8f5-4e00-b859-299ea80d65cb" alt=""><figcaption><p>Object Properties > Sollumz</p></figcaption></figure></div>

Typically when creating completely custom collisions, you would auto-calculate these values during export, as calculating these involves a lot of math relating to the dimensions and shape of your collisions.

<div align="left"><figure><img src="https://4252508569-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcRAM9lBHCqq3QodZ420I%2Fuploads%2FtrSTb3RvQMavDS4Qpw5r%2Fimage.png?alt=media&#x26;token=090b7de5-a0da-4f11-8cfe-2909ca2a8c3d" alt=""><figcaption><p>Export Codewalker XML > Collisions</p></figcaption></figure></div>
