# SetHitEvents(bool)

> Enable/disable hit events on all shapes attached to the body. See PhysicsShape.hitEvents.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.LowLevelPhysics2D](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d.md)
* **Assembly:** UnityEngine.Physics2DModule

```csharp
public void SetHitEvents(bool hitEvents)
```

### Parameters

**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether hit events are allowed on all shapes attached to this body or not.
