Pathfinding.NavGraph.GetNearest C# (CSharp) Method

GetNearest() public method

public GetNearest ( Vector3 position ) : NNInfo
position Vector3
return NNInfo
		public NNInfo GetNearest (Vector3 position) {
			return GetNearest (position, NNConstraint.None);
		}
		

Same methods

NavGraph::GetNearest ( Vector3 position, NNConstraint constraint ) : NNInfo
NavGraph::GetNearest ( Vector3 position, NNConstraint constraint, GraphNode hint ) : NNInfo

Usage Example

 private bool isGraphWalkable(NavGraph graph)
 {
     var nearestNode = graph.GetNearest(PositionToCheck);
     return nearestNode.node != null && nearestNode.node.Walkable;
 }