A contact is a cached pair of overlapping shapes in the physics world. contacts are created by ContactManager when two AABBs of shapes begin overlapping.

As AABBs are larger than its shapes, shapes of a contact don't always touching or colliding though their AABBs are overlapping.

Methods

inlinegetContactConstraint():ContactConstraint

Returns the contact constraint.

inlinegetManifold():Manifold

Returns the contact manifold.

inlinegetNext():Contact

Returns the next contact in the world.

If the next contact does not exist, null will be returned.

inlinegetPrev():Contact

Returns the previous contact in the world.

If the previous contact does not exist, null will be returned.

inlinegetShape1():Shape

Returns the first shape of the contact.

inlinegetShape2():Shape

Returns the second shape of the contact.

inlineisTouching():Bool

Returns whether the shapes are touching.