<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/CollisionComponent/init(shapes:mode:filter:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation18CollisionComponentV6shapes4mode6filterACSayAA13ShapeResourceCG_AC4ModeOAA0C6FilterVtcfc"
  },
  "title" : "init(shapes:mode:filter:)"
}
-->

# init(shapes:mode:filter:)

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

```
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.

---

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)