# CastRay(CastRayInput)

> Perform a raycast against this AABB. Nothing will be detected if the ray starts inside the AABB. To check if the ray starts inside the AABB use PhysicsAABB.OverlapPoint.

## Definition

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

```csharp
public readonly PhysicsQuery.CastResult CastRay(PhysicsQuery.CastRayInput castRayInput)
```

### Parameters

**** (\[CastRayInput]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsquery/castrayinput)): The configuration of the ray to cast.

### Returns

| Type                                                                                                   | Description                           |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------- |
| [CastResult](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsquery/castresult.md) | The results of the intersection test. |
