Table of Contents

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
object
Trigger
Implements

Properties

NoContactResponse

Whether the object this is attached to should let colliders pass through it

public bool NoContactResponse { get; }

Property Value

bool

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

contacts Contacts<TManifold>

Data associated with this contact event.

Type Parameters

TManifold

Type 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

contacts Contacts<TManifold>

Data associated with this contact event.

Type Parameters

TManifold

Type of the contact manifold detected.

Events

OnEnter

public event TriggerDelegate? OnEnter

Event Type

TriggerDelegate

OnLeave

public event TriggerDelegate? OnLeave

Event Type

TriggerDelegate