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

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