Initializer

init(shapes:mode:filter:)

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

Declaration

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.