# PhysicsQuery.WorldCastMode

> Controls what results are returned from a cast query against the PhysicsWorld.

## Definition

* **Type:** Enum
* **Namespace:** [Unity.U2D.Physics](/engine/6000.5/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

```csharp
public enum PhysicsQuery.WorldCastMode
```

## Fields

| Value                                                                                                  | Description                                                              |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| [All](/engine/6000.5/script-reference/unity/u2d/physics/physicsquery/worldcastmode/all.md)             | Return all the hits.                                                     |
| [AllSorted](/engine/6000.5/script-reference/unity/u2d/physics/physicsquery/worldcastmode/allsorted.md) | Return all the hits but also sort by ascending distance (closest first). |
| [Closest](/engine/6000.5/script-reference/unity/u2d/physics/physicsquery/worldcastmode/closest.md)     | Return only the closest hit.                                             |
