# ContactResult

Class · category: Physics

Source: https://github.com/playcanvas/engine/blob/970d89f6d3bc6667f4e1f88153abd6e7e82ed52c/src/framework/components/rigid-body/contact-result.js#L32

Represents a collection of contact points between two entities in a physics collision.
When rigid bodies collide, this object stores the entity involved in the collision and
an array of specific contact points where the collision occurred. This information is
used by the physics system to resolve collisions and notify components through events.

Instances of this class are passed to event handlers for the `contact` and `collisionstart`
events on individual [RigidBodyComponent](https://api.playcanvas.com/engine/classes/RigidBodyComponent.md) and [CollisionComponent](https://api.playcanvas.com/engine/classes/CollisionComponent.md) instances.

Unlike [SingleContactResult](https://api.playcanvas.com/engine/classes/SingleContactResult.md) which is used for global contact events, ContactResult
objects provide information about collision from the perspective of one entity, with
information about which other entity was involved and all points of contact.

Contact results are pooled and reused by the physics system, so a result and its contact
points are only valid inside the event handler that receives them. Copy any values that are
needed later.

Please refer to the following event documentation for more information:

- [CollisionComponent.EVENT_CONTACT](https://api.playcanvas.com/engine/classes/CollisionComponent.md#event_contact)
- [CollisionComponent.EVENT_COLLISIONSTART](https://api.playcanvas.com/engine/classes/CollisionComponent.md#event_collisionstart)
- [RigidBodyComponent.EVENT_CONTACT](https://api.playcanvas.com/engine/classes/RigidBodyComponent.md#event_contact)
- [RigidBodyComponent.EVENT_COLLISIONSTART](https://api.playcanvas.com/engine/classes/RigidBodyComponent.md#event_collisionstart)

## Properties

### contacts

```ts
contacts: ContactPoint[]
```

An array of ContactPoints with the other entity.

### other

```ts
other: Entity
```

The entity that was involved in the contact with this entity.
