# hit

> Flag set when the query encounters a particular valid situation.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine.AI](/engine/6000.7/script-reference/unityengine/ai.md)
* **Assembly:** UnityEngine.AIModule

```csharp
public bool hit { get; set; }
```

### Remarks

The queries set this flag differently. [NavMesh.SamplePosition](/engine/6000.7/script-reference/unityengine/ai/navmesh/sampleposition.md) reports `hit` as true every time it returns a valid position on the NavMesh. The rest of the methods report `hit` as true when the edge of a NavMesh polygon blocks the query before it can reach the target position. In all other cases `hit` is false.
