跳转到内容

ColliderShape

此内容尚不支持你的语言。

ColliderShape = { halfExtents: Vec2; kind: "box"; offset: Vec2; } | { kind: "circle"; offset: Vec2; radius: number; } | { halfHeight: number; kind: "capsule"; offset: Vec2; radius: number; } | { kind: "segment"; point1: Vec2; point2: Vec2; } | { kind: "polygon"; vertices: Vec2[]; } | { isLoop: boolean; kind: "chain"; points: Vec2[]; }

Defined in: physics/ColliderShape.ts:32

A collider’s geometry, in physics metres. Offset (box/circle/capsule) is metres too; segment/polygon/chain carry their points directly and sit at the entity origin.