Skip to main content

Function: detectCirclePolygonCollision()

detectCirclePolygonCollision(circleBody, polygonBody): CollisionManifold | null

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

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

CollisionManifold | null

A CollisionManifold if the shapes overlap, otherwise null.