Skip to content

Abstract Class: Collider2DComponent ​

2D colliders (Unity's Collider2D family). A collider belongs to the nearest Rigidbody2D on its entity or an ancestor; without one it's static scenery that follows its Transform. Geometry is in the entity's local pixels around its origin (the pivot), scaled by its world scale. Physics2DSystem rebuilds a collider's fixtures when a field changes (dirty, which it owns) or its scale / placement under the body does.

Extends ​

Extended by ​

Constructors ​

Constructor ​

ts
new Collider2DComponent(): Collider2DComponent;

Returns ​

Collider2DComponent

Inherited from ​

Component.constructor

Properties ​

PropertyModifierTypeDefault valueInherited from
bouncinesspublicnumberundefined-
densitypublicnumberundefined-
dirtypublicbooleantrueComponent.dirty
enabledpublicbooleantrueComponent.enabled
frictionpublicnumberundefined-
isTriggerpublicbooleanundefined-
layerpublicnumberundefined-
offsetXpublicnumberundefined-
offsetYpublicnumberundefined-

Accessors ​

attachedRigidbody ​

Get Signature ​

ts
get attachedRigidbody(): Rigidbody2DComponent | null;

The Rigidbody2D this collider moves with (null = static scenery, or not simulated yet).

Returns ​

Rigidbody2DComponent | null

Methods ​

OverlapPoint() ​

ts
OverlapPoint(x, y): boolean;

Whether the world point (px) is inside this collider. False until it's simulated.

Parameters ​

ParameterType
xnumber
ynumber

Returns ​

boolean

© 2026 PlayAdGentic