Skip to main content

Module: physics/solvers/collision/impulse

Functions

calculateRelativeVelocity

โ–ธ calculateRelativeVelocity(m, contactA, contactB): vec2

Calculates the relative velocity for the impulse resolution of a collision between 2 CollisionObjects.

Parameters

NameTypeDescription
mManifoldThe manifold of the collision between a and b
contactAvec2The contact point on a
contactBvec2The contact point on b

Returns

vec2

Defined in

src/physics/solvers/collision/impulse.ts:93


solveImpulse

โ–ธ solveImpulse(m): void

Solves the impulse for a collision described by a Manifold.

Parameters

NameTypeDescription
mManifoldManifold describing the collision to solve the impulse for

Returns

void

Defined in

src/physics/solvers/collision/impulse.ts:17