PhysicsBodyComponent.OnCollisionStayWithShape Event
Definition¶
Namespace: Brine2D.ECS.Components
Fired every fixed-update tick while this body remains in contact with another body, with sub-shape detail.
public event Action<PhysicsBodyComponent,CollisionContact,SubShape?,SubShape?>? OnCollisionStayWithShape;
Event Type¶
System.Action<PhysicsBodyComponent,CollisionContact,SubShape,SubShape>
Remarks¶
The sub-shape arguments reflect the sub-shapes that were present at the time the contact was \<em>first established\</em> (i.e. the enter tick), not necessarily the current sub-shapes. If sub-shapes are rebuilt at runtime (e.g. via a Shape reassignment or AddSubShape(ShapeDefinition, bool, Nullable<float>, Nullable<float>) call) while a contact is already active, the reported sub-shape references may be stale until the contact ends and re-enters. Use Brine2D.ECS.Components.PhysicsBodyComponent.OnCollisionStay for body-level events that are unaffected by sub-shape rebuilds.