---
title: ClothBodyComponent.ColliderBinding
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/clothbodycomponent/colliderbinding-swift.struct
---

# ClothBodyComponent.ColliderBinding

Binds the cloth body to an entity’s mesh collider.

## Declaration

```swift
struct ColliderBinding
```

## Overview

Overview If the binding is successful, the body particles will be constrained to stay within a configurable distance of their automatically assigned mesh collider triangles, following the collider as it deforms or moves. The per-particle distanceLimits controls how strictly each particle is bound. This can be especially useful to “reset” particles back to their original positions with respect to the collider. For example, when an animated character is teleported and we want some garment the character was wearing to teleport with it in a correct manner. The triangle on the source collider that each particle will be bound to is computed when the simulation starts, and it is chosen to be the closest triangle to the particle position at that moment. For the best results, when using this component to attach a garment to an animated character, you should make sure that the position and shape of the collider matches the garment closely at the moment the animation starts.

## Topics

### Binding the collider

- [sourceCollider](realitykit/clothbodycomponent/colliderbinding-swift.struct/sourcecollider.md)
- [isEnabled](realitykit/clothbodycomponent/colliderbinding-swift.struct/isenabled.md)

### Tuning collision response

- [distanceLimits](realitykit/clothbodycomponent/colliderbinding-swift.struct/distancelimits.md)
- [teleportThresholdSpeed](realitykit/clothbodycomponent/colliderbinding-swift.struct/teleportthresholdspeed.md)

## Relationships

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Managing collisions

- [colliderBinding](realitykit/clothbodycomponent/colliderbinding-swift.property.md)
- [collisionFilters](realitykit/clothbodycomponent/collisionfilters.md)
- [enableCollisions(towards:)](realitykit/clothbodycomponent/enablecollisions(towards:).md)
- [disableCollisions(towards:)](realitykit/clothbodycomponent/disablecollisions(towards:).md)
