# rigidbody

> The rigidbody that was hit by the controller.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.PhysicsModule

```csharp
public Rigidbody rigidbody { get; }
```

### Remarks

Null if we didn't touch a rigidbody but a static collider.

### Examples

```csharp
using UnityEngine;

public class Example : MonoBehaviour
{
    // Activate the gravity of other object we touch
    void OnControllerColliderHit(ControllerColliderHit hit)
    {
        if (hit != null)
        {
            hit.rigidbody.useGravity = true;
        }
    }
}
```
