Data Structure used to listen for Collisions between Bodies.
Static variables
Variables
correction_threshold:Float
Threshold determining how close two separating bodies must be before position correction occurs. Helps reduce jitter.
percent_correction:Float
Percentage of correction along the collision normal to be applied to seperating bodies. Helps prevent objects sinking into each other.
separate:Bool
Flag that determines if Collisions found by this listener should separate the Bodies. Defaults to true
.
optionalcondition:(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
optionalenter:(Body, Body, Array<CollisionData>) ‑> Void
A callback function that is called on the first frame that a collision starts.