> For the complete documentation index, see [llms.txt](https://gley.gitbook.io/mobile-pedestrian-system/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gley.gitbook.io/mobile-pedestrian-system/events/oncollisionenter.md).

# OnCollisionEnter

### Description

Triggered every time a pedestrian collides with something.

### Delegate

```csharp
 public delegate void CollisionEnter(int pedestrianIndex, Collision collision, ObstacleTypes obstacleType);
```

### Parameters

<table><thead><tr><th width="215">Name</th><th>Description</th></tr></thead><tbody><tr><td><strong>pedestrianIndex</strong></td><td>The index of the pedestrian.</td></tr><tr><td><strong>collision</strong></td><td>The collision object.</td></tr><tr><td><strong>obstacleType</strong></td><td>The type of the obstacle (Player, DynamicObject, StaticObject, Pedestrian)</td></tr></tbody></table>

### Example

Check **HasCollided.cs** for a complete implementation example.
