Optional
options: Partial<EdgeColliderOptions>Ignores collisions with layers in the array
Collision layer
X-Y axis offset
TRUE if this collider interact with rigid bodies
Edges rotation in radians
Collection of 2d vectors representing the vertices of the collider
The EdgeCollider component defines a collision shape made up of connected line segments.
It can be used for both physics interactions and collision detection.
The collider's shape is determined by a series of vertices that form edges between them.
The shape can be offset and rotated, and collision layers allow controlling which objects can collide with each other.
Example