struct

Flock::Collision::ContactManifold2D

Inherits Struct < Value < Object

A contact manifold: a shared normal (A -> B) and 1 or 2 contact points. Two points let the solver hold an edge-to-edge contact flat (e.g. a box resting on the ground) instead of pivoting on a single point.

Constructors

new(normal : Flock::Vec2, points : Array(ContactPoint2D))
Source
single(normal : Flock::Vec2, point : Flock::Vec2, penetration : Float32) : ContactManifold2D
Source

Instance methods

deepest

Deepest point — used for the summary event and single-point compatibility.

Source
each_manifold

Yields one single-point Manifold2D per contact point (all share normal).

Source
normal
Source
penetration
Source
point
Source
points
Source