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 : IContactHandler
- 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>(Contacts<TManifold>)
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>(Contacts<TManifold> contacts) where TManifold : unmanaged, IContactManifold<TManifold>
Parameters
contactsContacts<TManifold>Data associated with this contact event.
Type Parameters
TManifoldType of the contact manifold detected.
OnStoppedTouching<TManifold>(Contacts<TManifold>)
Fires when a pair stops touching. Touching means that there are contacts with nonnegative depths in the manifold.
protected void OnStoppedTouching<TManifold>(Contacts<TManifold> contacts) where TManifold : unmanaged, IContactManifold<TManifold>
Parameters
contactsContacts<TManifold>Data associated with this contact event.
Type Parameters
TManifoldType of the contact manifold detected.
Events
OnEnter
public event TriggerDelegate? OnEnter
Event Type
OnLeave
public event TriggerDelegate? OnLeave