Skip to main content

CollisionContact

Collision contacts are used internally by Excalibur to resolve collision between colliders. This Pair prevents collisions from being evaluated more than one time

Index

Constructors

constructor

Properties

bodyA

bodyA: BodyComponent = null

bodyB

bodyB: BodyComponent = null

colliderA

colliderA: Collider

The first collider in the collision

colliderB

colliderB: Collider

The second collider in the collision

readonlyid

id: string

Currently the ids between colliders

info

info: SeparationInfo

Information about the specifics of the collision contact separation

localPoints

localPoints: Vector[]

Local space contact points between colliderA and colliderB

mtv

mtv: Vector

The minimum translation vector to resolve overlap, pointing away from colliderA

normal

normal: Vector

The collision normal, pointing away from colliderA

points

points: Vector[]

World space contact points between colliderA and colliderB

tangent

tangent: Vector

The collision tangent

Methods

publiccancel

  • cancel(): void
  • Returns void

publicisCanceled

  • isCanceled(): boolean
  • Returns boolean

publicmatchAwake

  • matchAwake(): void
  • Match contact awake state, except if body's are Fixed


    Returns void