PhysicsBodyComponent.ShouldCollide Property
Definition¶
Namespace: Brine2D.ECS.Components
Per-body collision filter. When set, called for every candidate contact pair involving
this body — return false to prevent the pair from colliding or triggering.
Both bodies in the pair are checked; either can veto the contact.
The callback is invoked from the Box2D broad-phase on the simulation thread — keep it
allocation-free.
public System.Func<Brine2D.ECS.Components.PhysicsBodyComponent,bool>? ShouldCollide { get; set; }