# CastShape(CastShapeInput, out PhysicsShape)

> Calculate if a cast shape intersects the chain. See PhysicsQuery.CastShapeInput and PhysicsQuery.CastResult.

## Definition

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

## CastShape(CastShapeInput, PhysicsShape)

```csharp
public PhysicsQuery.CastResult CastShape(PhysicsQuery.CastShapeInput input, out PhysicsShape chainSegmentShape)
```

### Parameters

**** (\[CastShapeInput]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsquery/castshapeinput)): The cast shape input used to check for intersection.**** (\[PhysicsShape]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsshape)): A reference to the chain segment shape that the query found.

### Returns

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