<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/ClothCollisionFilter",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:22RealityFoundationCloth0C15CollisionFilterV"
  },
  "title" : "ClothCollisionFilter"
}
-->

# ClothCollisionFilter

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

```
struct ClothCollisionFilter
```

## 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: ClothCollisionGroupSet, mask: ClothCollisionGroupSet)`](/documentation/RealityKit/ClothCollisionFilter/init(groups:mask:))

Creates a collision filter with the given groups and mask.

### Configuring collision groups

[`var groups: ClothCollisionGroupSet`](/documentation/RealityKit/ClothCollisionFilter/groups)

The set of collision groups, stored as a bit mask, to which the entity belongs.

[`var mask: ClothCollisionGroupSet`](/documentation/RealityKit/ClothCollisionFilter/mask)

The set of collision groups, stored as a bit mask, towards which the entity introduces one-way collisions.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)