crashcat docs
    Preparing search index...

    Function findContact

    • Find a contact between two bodies with specific sub-shapes. Iterates through the smaller body's contact list (O(n) but typically small n).

      Parameters

      • contacts: Contacts

        global contact array

      • bodyA: RigidBody

        first body

      • bodyB: RigidBody

        second body

      • subShapeIdA: number

        sub-shape ID for body A

      • subShapeIdB: number

        sub-shape ID for body B

      Returns Contact | null

      The contact if found, null otherwise