# CastRay(CastRayInput)

> Check if a ray intersects the shape. See PhysicsQuery.CastResult.

## Definition

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

```csharp
public 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 intersection details, if any, that were found. |
