# OverlapCapsuleNonAlloc(Vector3, Vector3, float, Collider[], int, QueryTriggerInteraction)

> Check the given capsule against the physics world and return all overlapping colliders in the user-provided buffer.

## Definition

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

```csharp
public static int OverlapCapsuleNonAlloc(Vector3 point0, Vector3 point1, float radius, Collider[] results, int layerMask, QueryTriggerInteraction queryTriggerInteraction)
```

### Parameters

**** (\[Vector3]\(/engine/6000.0/script-reference/unityengine/vector3)): The center of the sphere at the start of the capsule.**** (\[Vector3]\(/engine/6000.0/script-reference/unityengine/vector3)): The center of the sphere at the end of the capsule.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The radius of the capsule.**** (\[Collider\[]]\(/engine/6000.0/script-reference/unityengine/collider)): The buffer to store the results into.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): A [Layer mask](/engine/6000.0/manual/working-with-gameobjects/layers.md) that is used to selectively ignore colliders when casting a capsule.**** (\[QueryTriggerInteraction]\(/engine/6000.0/script-reference/unityengine/querytriggerinteraction)): Specifies whether this query should hit Triggers.

### Returns

| Type                                                       | Description                                  |
| ---------------------------------------------------------- | -------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The amount of entries written to the buffer. |

### Remarks

Same as [Physics.OverlapCapsule](/engine/6000.0/script-reference/unityengine/physics/overlapcapsule.md) but does not allocate anything on the managed heap.
