---
title: "init(groups:mask:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/clothcollisionfilter/init(groups:mask:)"
---

# init(groups:mask:)

Creates a collision filter with the given groups and mask.

## Declaration

```swift
init(groups: ClothCollisionGroupSet, mask: ClothCollisionGroupSet)
```

## Parameters

- `groups`: The set of collision groups that the entity belongs to.
- `mask`: The set of collision groups that the entity introduces one-way collisions towards.
