Fields

@:optionaloptionalstay:Null<(Body, Body, Array<CollisionData>) ‑> Void>

A callback function that is called on frames when two Bodies are continuing to collide.

@:optionaloptionalseparate:Null<Bool>

Flag that determines if Collisions found by this listener should separate the Bodies. Defaults to true.

@:optionaloptionalpercent_correction:Null<Float>

Percentage of correction along the collision normal to be applied to seperating bodies. Helps prevent objects sinking into each other.

@:optionaloptionalexit:Null<(Body, Body) ‑> Void>

A callback function that is called when a collision between two Bodies ends.

@:optionaloptionalenter:Null<(Body, Body, Array<CollisionData>) ‑> Void>

A callback function that is called on the first frame that a collision starts.

@:optionaloptionalcorrection_threshold:Null<Float>

Threshold determining how close two separating bodies must be before position correction occurs. Helps reduce jitter.

@:optionaloptionalcondition:Null<(Body, Body, Array<CollisionData>) ‑> Bool>

A callback function that allows extra logic to be run on a potential collision.

If it returns true, the collision is valid. Otherwise the collision is discarded and no physics resolution/collision callbacks occur.