Collider Events
Collider events are a generalized event system for all collider interactions.
More actions
Collider events are a generalized event system for physical collider interactions, similar to Button Events. Components can send or receive these events to react to objects touching, overlapping, or separating.
Event Types
There are three event types, covering the full lifecycle of a collision:
- Contact Start
- Fires once when two colliders first make contact.
- Contact Stay
- Fires every frame while two colliders remain in contact.
- Contact End
- Fires once when two colliders in contact separate.
Collider Event Data
Each collider event is passed as a ContactEvent delegate with two parameters:
| Parameter Name | Parameter Type | Description |
|---|---|---|
| collider | ICollider | The collider on the receiving object that detected the event. |
| other | ICollider | The other collider involved in the collision. |
Collider Event Senders
| Component | Notes |
|---|---|
| ColliderEventRelay | Watches a specified ICollider and exposes its contact events as SyncDelegate fields that can be wired in the inspector. |
| CollisionListenerComponent | Listens to all ICollider components on its Slot and forwards contact events to any subclass that extends it. |
Collider Event Receivers
This article or section is a stub. You can help the Resonite wiki by expanding it.