Skip to main content

Function: detectCirclePolygonCollision()

detectCirclePolygonCollision(circleBody, polygonBody): null | CollisionManifold

Defined in: physics/collision/detect-circle-polygon-collision.ts:114

Detects a collision between a circle-shaped body and a polygon-shaped body.

Parameters

circleBody

RigidBody

The body with a CircleShape. Becomes bodyA of the returned manifold.

polygonBody

RigidBody

The body with a PolygonShape. Becomes bodyB of the returned manifold.

Returns

null | CollisionManifold

A CollisionManifold if the shapes overlap, otherwise null.