Skip to content

PhysicsWorld.GetContactsAll(PhysicsBodyComponent, List) Method

Definition

Namespace: Brine2D.Physics

Reads the live contact manifolds for body directly from Box2D and adds them to results. Clears results before writing. Returns immediately if the body is not live or has no active contacts.

public void GetContactsAll(Brine2D.ECS.Components.PhysicsBodyComponent body, System.Collections.Generic.List<Brine2D.Physics.ContactPair> results);

Parameters

body PhysicsBodyComponent

The body to query contacts for.

results System.Collections.Generic.List<ContactPair>

List to receive contact pairs.

Remarks

Retries internally with a larger buffer if needed — guaranteed to return every contact. Contact normals are oriented away from the other body toward body.