# 02 Find Things

Spatial queries — get the closest node/path/point on the network.

| Node                             | Returns       | What it does                                              |
| -------------------------------- | ------------- | --------------------------------------------------------- |
| **Find Nearest Node**            | Node          | Closest node to a world position.                         |
| **Find Nearest Path**            | Path          | Closest path to a world position.                         |
| **Get Closest Point On Network** | struct        | Closest point overall (could be on a node or mid-spline). |
| **Snap Location To Network**     | Vector        | Same idea, returns just the world position.               |
| **Get All Nodes In Radius**      | array of Node | Every node within a radius of a position.                 |
| **Is Point Near Network**        | bool          | True if any network element is within max distance.       |

## Examples

| Want                                         | Setup                                                |
| -------------------------------------------- | ---------------------------------------------------- |
| Pick where the AI should join the network    | **Snap Location To Network** with the AI's position. |
| Find a random spawn waypoint near the player | **Get All Nodes In Radius** + random pick.           |
| Decide whether to use OWP or NavMesh-only    | **Is Point Near Network** with a max distance.       |
| Get a node from a quest marker               | **Find Nearest Node** from the marker's location.    |

## Closest Point Result fields

| Field                   | Meaning                                              |
| ----------------------- | ---------------------------------------------------- |
| **Location**            | World position of the closest point.                 |
| **Distance**            | Distance from your query point.                      |
| **Is Node**             | True if it's on a node, false if on a path's spline. |
| **Actor**               | The owning node or path.                             |
| **Distance Along Path** | If it's on a path, how far along the spline.         |

## Tips

* These functions iterate the registry. They're cheap for typical networks but don't call them every frame.
* Cache the result on the AI controller and refresh on a timer.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://onesteppack.gitbook.io/openworldnavigation-doc/06-blueprint-functions/02-find-things.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
