# 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](/documentation/drawables.ydr/rigging.md#linking-bones-to-drawable-models).

<div align="left"><figure><img src="/files/NVRKQ45r2Xhjd9fVVIzU" 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="/files/7BxWygEowtnYbjhEQE3a" 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="/files/lXV8Z3aiGUsH9PbrscUz" 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="/files/LATUB4DrmV944ZBPBCg0" 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="/files/LBjAbRZA4x3n1uEzhtQ2" alt=""><figcaption><p>Export Codewalker XML > Collisions</p></figcaption></figure></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sollumz.org/documentation/fragments.yft/collision-physics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
