arcade2d
Type Alias

ColliderShape

physics/rigid-body.types.ts:68

A shape usable as a physics collider. The engine's existing geometry primitives double as collider shapes, plus Capsule for the one shape geometry doesn't model.

Shapes are interpreted in the host WorldObject's local space, exactly like the graphics components — vertex/centre (0, 0) is the host's position. In particular a Rectangle collider is treated as centered on the origin with the rectangle's width/height as its full extents, matching PolygonGraphics.asRectangle (and intentionally differing from the geometry Rectangle's top-left anchoring). Offset a collider from the origin with ColliderOptions.offset when you need it off-center.

Circle | Rectangle | Polygon | Capsule
ESC