Skip to main content

Pair

Models a potential collision between 2 colliders

Index

Constructors

constructor

Properties

publiccolliderA

colliderA: Collider

publiccolliderB

colliderB: Collider

publicid

id: string = null

Accessors

publiccanCollide

  • get canCollide(): boolean
  • Returns whether or not it is possible for the pairs to collide


    Returns boolean

Methods

publiccollide

  • Runs the collision intersection logic on the members of this pair


    Returns CollisionContact[]

publichasCollider

  • hasCollider(collider: Collider): boolean
  • Check if the collider is part of the pair


    Parameters

    Returns boolean

publicstaticcalculatePairHash

  • calculatePairHash(idA: Id<collider>, idB: Id<collider>): string
  • Calculates the unique pair hash id for this collision pair (owning id)


    Parameters

    • idA: Id<collider>
    • idB: Id<collider>

    Returns string

publicstaticcanCollide

  • Returns whether a it is allowed for 2 colliders in a Pair to collide


    Parameters

    Returns boolean