Skip to content

eulerjs API / @eulerjs/core/extend / ContactPoint

ContactPoint ​

Defined in: packages/core/src/javascript/collision/narrowphase.ts:14

Where two colliders touch, or nearly do. normal is a unit vector from B toward A (the way A must move to separate), pointA and pointB are the closest (or deepest) points of each, and depth is how far they overlap along the normal, (pointB - pointA) · normal: negative for a gap, which a contact within the margin can have.

Properties ​

PropertyModifierTypeDefined in
depthpublicnumberpackages/core/src/javascript/collision/narrowphase.ts:18
normalreadonlyVector3packages/core/src/javascript/collision/narrowphase.ts:17
pointAreadonlyVector3packages/core/src/javascript/collision/narrowphase.ts:15
pointBreadonlyVector3packages/core/src/javascript/collision/narrowphase.ts:16

Released under the MIT License.