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
- 
      objectTrigger
- 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
- eventSourceCollidableComponent
- Collidable that the event was attached to. 
- otherCollidableComponent
- Other collider - eventSourcecollided with.
- contactManifoldTManifold
- Set of remaining contacts in the collision. 
- flippedManifoldbool
- Whether the manifold's normals and offset is flipped from the source's point of view. 
- contactIndexint
- bepuSimulationBepuSimulation
- The 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
- eventSourceCollidableComponent
- Collidable that the event was attached to. 
- otherCollidableComponent
- Other collider - eventSourcecollided with.
- contactManifoldTManifold
- Set of remaining contacts in the collision. 
- flippedManifoldbool
- Whether the manifold's normals and offset is flipped from the source's point of view. 
- contactIndexint
- bepuSimulationBepuSimulation
- The simulation where the contact occured. 
Type Parameters
- TManifold
- Type of the contact manifold detected. 
Events
OnEnter
public event TriggerDelegate? OnEnterEvent Type
OnLeave
public event TriggerDelegate? OnLeave