Class Trigger
- Namespace
- Stride.BepuPhysics.Definitions
- Assembly
- Stride.BepuPhysics.dll
A contact event handler without collision response, which runs delegates on enter and exit
[DataContract]
public class Trigger : IContactEventHandler
- Inheritance
-
Trigger
- Implements
Properties
NoContactResponse
Whether the object this is attached to should let colliders pass through it
public bool NoContactResponse { get; }
Property Value
Methods
OnStartedTouching<TManifold>(CollidableComponent, CollidableComponent, ref TManifold, bool, int, BepuSimulation)
Fires the first time a pair is observed to be touching. Touching means that there are contacts with nonnegative depths in the manifold.
protected void OnStartedTouching<TManifold>(CollidableComponent eventSource, CollidableComponent other, ref TManifold contactManifold, bool flippedManifold, int contactIndex, BepuSimulation bepuSimulation)
Parameters
eventSource
CollidableComponentCollidable that the event was attached to.
other
CollidableComponentOther collider
eventSource
collided with.contactManifold
TManifoldSet of remaining contacts in the collision.
flippedManifold
boolWhether the manifold's normals and offset is flipped from the source's point of view.
contactIndex
intbepuSimulation
BepuSimulationThe simulation where the contact occured.
Type Parameters
TManifold
Type of the contact manifold detected.
OnStoppedTouching<TManifold>(CollidableComponent, CollidableComponent, ref TManifold, bool, int, BepuSimulation)
Fires when a pair stops touching. Touching means that there are contacts with nonnegative depths in the manifold.
protected void OnStoppedTouching<TManifold>(CollidableComponent eventSource, CollidableComponent other, ref TManifold contactManifold, bool flippedManifold, int contactIndex, BepuSimulation bepuSimulation)
Parameters
eventSource
CollidableComponentCollidable that the event was attached to.
other
CollidableComponentOther collider
eventSource
collided with.contactManifold
TManifoldSet of remaining contacts in the collision.
flippedManifold
boolWhether the manifold's normals and offset is flipped from the source's point of view.
contactIndex
intbepuSimulation
BepuSimulationThe simulation where the contact occured.
Type Parameters
TManifold
Type of the contact manifold detected.
Events
OnEnter
public event TriggerDelegate? OnEnter
Event Type
OnLeave
public event TriggerDelegate? OnLeave