# Interface PhysicsHooks

interface PhysicsHooks {
filterContactPair(collider1, collider2, body1, body2): SolverFlags;
filterIntersectionPair(collider1, collider2, body1, body2): boolean;
}

- Defined in pipeline/physics_hooks.d.ts:12

#####
Index

### Methods

filterContactPair
filterIntersectionPair

## Methods

### filterContactPair

- filterContactPair(collider1, collider2, body1, body2): SolverFlags

- Function that determines if contacts computation should happen between two colliders, and how the constraints solver should behave for these contacts.

  This will only be executed and taken into account if at least one of the involved colliders contains the `ActiveHooks.FILTER_CONTACT_PAIR` flag in its active hooks.

  #### Parameters

  - collider1: number

    − Handle of the first collider involved in the potential contact.

  - collider2: number

    − Handle of the second collider involved in the potential contact.

  - body1: number

    − Handle of the first body involved in the potential contact.

  - body2: number

    − Handle of the second body involved in the potential contact.

  #### Returns SolverFlags

  - Defined in pipeline/physics_hooks.d.ts:25

### filterIntersectionPair

- filterIntersectionPair(collider1, collider2, body1, body2): boolean

- Function that determines if intersection computation should happen between two colliders (where at least one is a sensor).

  This will only be executed and taken into account if `one of the involved colliders contains the` ActiveHooks.FILTER_INTERSECTION_PAIR` flag in its active hooks.

  #### Parameters

  - collider1: number

    − Handle of the first collider involved in the potential contact.

  - collider2: number

    − Handle of the second collider involved in the potential contact.

  - body1: number

    − Handle of the first body involved in the potential contact.

  - body2: number

    − Handle of the second body involved in the potential contact.

  #### Returns boolean

  - Defined in pipeline/physics_hooks.d.ts:38