Struct TriggerEvent
An event raised when a pair of bodies involving a trigger material have overlapped during solving.
Inherited Members
Namespace: Unity.Physics
Syntax
public struct TriggerEvent : ISimulationEvent<TriggerEvent>, IComparable<TriggerEvent>
Properties
BodyIndexA
Gets the body index a.
Declaration
public readonly int BodyIndexA { get; }
Property Value
Type | Description |
---|---|
Int32 | The body index a. |
Implements
BodyIndexB
Gets the body index b.
Declaration
public readonly int BodyIndexB { get; }
Property Value
Type | Description |
---|---|
Int32 | The body index b. |
Implements
ColliderKeyA
Gets the collider key a.
Declaration
public readonly ColliderKey ColliderKeyA { get; }
Property Value
Type | Description |
---|---|
ColliderKey | The collider key a. |
Implements
ColliderKeyB
Gets the collider key b.
Declaration
public readonly ColliderKey ColliderKeyB { get; }
Property Value
Type | Description |
---|---|
ColliderKey | The collider key b. |
Implements
EntityA
Gets the entity a.
Declaration
public readonly Entity EntityA { get; }
Property Value
Type | Description |
---|---|
Entity | The entity a. |
Implements
EntityB
Gets the entity b.
Declaration
public readonly Entity EntityB { get; }
Property Value
Type | Description |
---|---|
Entity | The entity b. |
Implements
Methods
CompareTo(TriggerEvent)
Compares this TriggerEvent object to another to determine their relative ordering.
Declaration
public int CompareTo(TriggerEvent other)
Parameters
Type | Name | Description |
---|---|---|
TriggerEvent | other | Another instance to compare. |
Returns
Type | Description |
---|---|
Int32 | Negative if this object is less than the other, 0 if they are equal, or positive if this is greater. |