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
eventSourceCollidableComponentCollidable that the event was attached to.
otherCollidableComponentOther collider
eventSourcecollided with.contactManifoldTManifoldSet of remaining contacts in the collision.
flippedManifoldboolWhether the manifold's normals and offset is flipped from the source's point of view.
contactIndexintbepuSimulationBepuSimulationThe simulation where the contact occured.
Type Parameters
TManifoldType 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
eventSourceCollidableComponentCollidable that the event was attached to.
otherCollidableComponentOther collider
eventSourcecollided with.contactManifoldTManifoldSet of remaining contacts in the collision.
flippedManifoldboolWhether the manifold's normals and offset is flipped from the source's point of view.
contactIndexintbepuSimulationBepuSimulationThe simulation where the contact occured.
Type Parameters
TManifoldType of the contact manifold detected.
Events
OnEnter
public event TriggerDelegate? OnEnter
Event Type
OnLeave
public event TriggerDelegate? OnLeave