---
title: "init(shapes:mode:filter:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/collisioncomponent/init(shapes:mode:filter:)"
---

# init(shapes:mode:filter:)

Creates a collision component with the given collision shape, mode, and filter parameters.

## Declaration

```swift
init(shapes: [ShapeResource], mode: CollisionComponent.Mode = .default, filter: CollisionFilter = .default)
```

## Parameters

- `shapes`: The collection of shapes that collectively define the outer dimensions of the associated entity for the purposes of collision detection.
- `mode`: The mode of the collision component.
- `filter`: A filter that limits the other entities with which the entity can collide.
