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 : 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

bool

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 CollidableComponent

Collidable that the event was attached to.

other CollidableComponent

Other collider eventSource collided with.

contactManifold TManifold

Set of remaining contacts in the collision.

flippedManifold bool

Whether the manifold's normals and offset is flipped from the source's point of view.

contactIndex int
bepuSimulation BepuSimulation

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

eventSource CollidableComponent

Collidable that the event was attached to.

other CollidableComponent

Other collider eventSource collided with.

contactManifold TManifold

Set of remaining contacts in the collision.

flippedManifold bool

Whether the manifold's normals and offset is flipped from the source's point of view.

contactIndex int
bepuSimulation BepuSimulation

The simulation where the contact occured.

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