I want to randomly generate my destination point, how do I know if it is inside recast graph?

I don’t seem to find any API that I could to use to see if the point is inside the graph region

One option is to use NearestPoint to find a point within the graph. Compare the distance of this to the original position. If it’s above a threshold distance then it is not within the graph area.

1 Like

I’m doing this:

` GraphNode isOnGraphNode = (AstarData.active.graphs[0] as RecastGraph).PointOnNavmesh(m_requestedTarget, NNConstraint.Default);`

1 Like