Skip to content

PhysicsBodyComponent.OnTriggerEnter Event

Definition

Namespace: Brine2D.ECS.Components

Fired once when another body begins overlapping this trigger.

public event Action<PhysicsBodyComponent>? OnTriggerEnter;

Event Type

System.Action<PhysicsBodyComponent>

Remarks

In rare cases — typically when a fast-moving body enters and exits the trigger within a single physics sub-step — OnTriggerEnter and OnTriggerExit may both fire on the same fixed-update tick with no intervening OnTriggerStay. This is expected Box2D behavior.