Interface: Collision2D
One side's view of a touching pair (OnCollisionEnter2D / Stay / Exit). collider is the receiving entity's collider (or, on a Rigidbody2D's entity, the collider of its body that touched), otherCollider the one it touched.
Properties
| Property | Type | Description |
|---|---|---|
collider | Collider2DComponent | - |
contacts | ContactPoint2D[] | - |
normalX | number | Unit normal pointing from the other collider towards this one (up, for something landing on the ground). |
normalY | number | - |
other | Entity | The other collider's entity. |
otherCollider | Collider2DComponent | - |
otherRigidbody | Rigidbody2DComponent | null | - |
relativeVelocityX | number | This body's velocity minus the other's at the first contact point (px/s) — its length is the impact speed. |
relativeVelocityY | number | - |
rigidbody | Rigidbody2DComponent | null | - |