---
title: ClothCollisionFilter
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/clothcollisionfilter
---

# ClothCollisionFilter

Defines the collision groups for a body or collider and the mask for one-way collisions.

## Declaration

```swift
struct ClothCollisionFilter
```

## Overview

Overview Collisions in cloth are one-way: an entity’s mask determines which groups it will push away, independently of whether the other entity pushes back. For a body particle to be displaced by a collider, the particle’s groups must overlap with the collider’s mask. For two body particles in a self-collision, each particle is independently displaced based on whether its groups overlap with the other particle’s mask.

## Topics

### Creating a collision filter

- [init(groups:mask:)](realitykit/clothcollisionfilter/init(groups:mask:).md)

### Configuring collision groups

- [groups](realitykit/clothcollisionfilter/groups.md)
- [mask](realitykit/clothcollisionfilter/mask.md)

## Relationships

### Conforms To

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

## See Also

### Collision

- [ClothColliderComponent](realitykit/clothcollidercomponent.md)
- [ClothColliderShape](realitykit/clothcollidershape.md)
- [ClothColliderMaterial](realitykit/clothcollidermaterial.md)
- [ClothCollisionGroupSet](realitykit/clothcollisiongroupset.md)
