private void FindPath(Vector3 targetPos)
    {
        NavigationNode start = VoronoiGraphBuilder.Instance.GetNearestNavNode(myObject.transform.position);
        NavigationNode end   = VoronoiGraphBuilder.Instance.GetNearestNavNode(targetPos);

        path = AstarNavigator.GetPath(start, end);
    }
Exemple #2
0
 public void FindPath()
 {
     path = AstarNavigator.GetPath(startNode, endNode);
     Debug.Log(path.Count);
 }