Description

A state generated for ColliderComponent collision events.

interface Collision {
    collider: ColliderComponent;
    contactCount: number;
    contacts: Contact[];
    id: number;
    getTypeName(): string;
    isOfType(type): boolean;
    isSame(other): boolean;
}

Hierarchy (view full)

Properties

Description

Primitive shapes that physics objects interact with, such as spheres, boxes, and meshes, or compound shapes formed from multiple shapes. Used with Physics, Hair Simulation and Cloth Simulation.

contactCount: number

Description

The number of contact points in the collision.

contacts: Contact[]

Description

Array of contacts in the collision.

id: number

Description

ID of the collision, unique for this collider.

Methods

  • Returns string

    Description

    Returns the name of this object's type.

  • Parameters

    • type: string

    Returns boolean

    Description

    Returns true if the object matches or derives from the passed in type.

  • Parameters

    Returns boolean

    Description

    Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

Generated using TypeDoc