Skip to content

PhysicsWorld.GetJoints(PhysicsBodyComponent, Span) Method

Definition

Namespace: Brine2D.Physics

Returns all joints that body participates in (as either body A or body B), written into results. Returns 0 if the body has no live joints or has not yet been created.

public int GetJoints(Brine2D.ECS.Components.PhysicsBodyComponent body, System.Span<Brine2D.ECS.Components.Joints.JointComponent> results);

Parameters

body PhysicsBodyComponent

The body to query joints for.

results System.Span<JointComponent>

Buffer to receive joint components.

Returns

System.Int32
Number of joints written to results.