Automated: create new component page |
add info |
||
Line 3: | Line 3: | ||
|Name=Collider Event Relay | |Name=Collider Event Relay | ||
}} | }} | ||
The '''ColliderEventRelay''' takes a collider to monitor and sends [[Type:ContactEvent|ContactEvent]] messages when certain collisions happen. | |||
== | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|Collider|ICollider| | |Collider|ICollider| The collider to monitor events for. | ||
|ContactStart|{{RootFieldType|SyncDelegate`1|[[Type:ContactEvent|ContactEvent]]}}|TypeAdv1=true| | |ContactStart|{{RootFieldType|SyncDelegate`1|[[Type:ContactEvent|ContactEvent]]}}|TypeAdv1=true| The Sync delegate of a certain definition to call when <code>Collider</code> starts contact with another collider. | ||
|ContactStay|{{RootFieldType|SyncDelegate`1|[[Type:ContactEvent|ContactEvent]]}}|TypeAdv2=true| | |ContactStay|{{RootFieldType|SyncDelegate`1|[[Type:ContactEvent|ContactEvent]]}}|TypeAdv2=true| The Sync delegate of a certain definition to call when <code>Collider</code> stays in contact with another collider. Is called every frame. | ||
|ContactEnd|{{RootFieldType|SyncDelegate`1|[[Type:ContactEvent|ContactEvent]]}}|TypeAdv3=true| | |ContactEnd|{{RootFieldType|SyncDelegate`1|[[Type:ContactEvent|ContactEvent]]}}|TypeAdv3=true| The Sync delegate of a certain definition to call when <code>Collider</code> ends contact with another collider. | ||
}} | }} | ||
== | == Usage == | ||
Can be used to trigger any other Component with a contact event method when a contact event happens. | |||
== Examples == | == Examples == | ||
{{stub}} | |||
== See Also == | == See Also == | ||
* [[ProtoFlux:On Contact Start]] | |||
* [[ProtoFlux:On Contact Stay]] | |||
* [[ProtoFlux:On Contact End]] | |||
[[Category:Components:Uncategorized{{#translation:}}|Collider Event Relay]] | [[Category:Components:Uncategorized{{#translation:}}|Collider Event Relay]] | ||
[[Category:Components{{#translation:}}|Collider Event Relay]] | [[Category:Components{{#translation:}}|Collider Event Relay]] | ||
Latest revision as of 18:38, 13 February 2025
Component image 
Collider Event Relay component as seen in the Scene Inspector

The ColliderEventRelay takes a collider to monitor and sends ContactEvent messages when certain collisions happen.
Fields
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't. |
Collider
|
ICollider | The collider to monitor events for. |
ContactStart
|
delegate of identity ContactEvent | The Sync delegate of a certain definition to call when Collider starts contact with another collider.
|
ContactStay
|
delegate of identity ContactEvent | The Sync delegate of a certain definition to call when Collider stays in contact with another collider. Is called every frame.
|
ContactEnd
|
delegate of identity ContactEvent | The Sync delegate of a certain definition to call when Collider ends contact with another collider.
|
Usage
Can be used to trigger any other Component with a contact event method when a contact event happens.
Examples
This article or section is a Stub. You can help the Resonite Wiki by expanding it.