arcade2d
Interface

ColliderOptions

physics/rigid-body.types.ts:75

Describes one collider attached to a RigidBody: its shape plus the material and role knobs that govern how it responds to contact. A body can carry several, letting you build a compound silhouette from primitives.

Properties

readonly #
density?: number

Mass density, in mass units per pixel². A dynamic body's mass and inertia are derived from its colliders' densities and areas. Defaults to Rapier's 1. Ignored for fixed bodies (infinite mass).

readonly #
friction?: number

Surface friction coefficient. 0 is frictionless; higher values resist sliding contact. Defaults to Rapier's 0.5.

readonly #
isSensor?: boolean

When true, the collider detects overlaps and reports contacts but does not push anything — a trigger volume. Defaults to false.

readonly #
offset?: PointPrimitive

Local-space offset of the shape from the host origin, in pixels. Defaults to (0, 0). Use it to place a collider off-center or to assemble a compound body from several offset primitives.

readonly #
restitution?: number

Bounciness, from 0 (no bounce, energy fully absorbed) to 1 (perfectly elastic). Defaults to Rapier's 0.

readonly #
shape: ColliderShape

The collider's shape, in host-local space. See ColliderShape.

ESC