> For the complete documentation index, see [llms.txt](https://distubredone322.gitbook.io/custom-vehicle-controller/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://distubredone322.gitbook.io/custom-vehicle-controller/guides/vehicle-damage-system/collision-handler.md).

# Collision Handler

Collision handler is a component that detects collisions on a Rigidbody, gathers information about the collision and sends it to the listeners.&#x20;

To use the CollisionHandler, assign it to the root game object, where Rigidbody component is attached.

Drag and drop the Rigidbody into the object field and, optionally, set the values to other fields.

<div align="left"><figure><img src="https://3780384024-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVPyvySfaC85jUgVcDPRJ%2Fuploads%2FvzOQTTmf66QiHRnVC5nh%2Fimage.png?alt=media&amp;token=0cffdde2-eeb9-4eb9-8bf6-0354de426a63" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
MinCollisionSpeed - speed in metres per second;

ImpactCollisionCooldown - the amount of time that must pass before triggering another impact collision event.
{% endhint %}

Then, in your own scripts, or the scripts that come with this package, like [VehicleDamageController](/custom-vehicle-controller/guides/vehicle-damage-system/vehicle-damage-controller.md), [VehicleExtraSoundManager ](/custom-vehicle-controller/guides/extra/adding-sound-effects/adding-extra-sound-effects.md)and [CarVisualsExtra](/custom-vehicle-controller/guides/extra/adding-visual-effects.md), get a reference to the CollisionHandler component.

In code, subscribe to events as you see fit.

<div align="left"><figure><img src="https://3780384024-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVPyvySfaC85jUgVcDPRJ%2Fuploads%2F35je1M1wUUG2QLCD3bkb%2Fimage.png?alt=media&amp;token=efe4913f-8489-43e7-adaa-24dca61f53c8" alt="" width="563"><figcaption></figcaption></figure></div>

Don't forget to unsubscribe from the events (usually in the OnDestroy method).

<div align="left"><figure><img src="https://3780384024-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVPyvySfaC85jUgVcDPRJ%2Fuploads%2FIX1OwFTSX9ZhfF3EgfZZ%2Fimage.png?alt=media&amp;token=47cc9833-9f2a-46c0-bcab-133bcb0e7a40" alt="" width="563"><figcaption></figcaption></figure></div>

### Collision Information

Events pass information about collision. See [CollisionHandler API](/custom-vehicle-controller/guides/api/collisionhandler.md) for details.
