Ejemplo n.º 1
0
    public bool StartNavMove(Vector3 startPos, Vector3 endPos)
    {
        if (mCrowdManager == null)
        {
            Debug.LogError(fileName + ": Aborted initialization. Failed crowd creation.");
            return(false);
        }


        NavmeshPoint startPoint;
        NavmeshPoint endPoint;

        NavStatus status0 = query.GetNearestPoint(startPos, Vector3.one, mCrowdManager.QueryFilter, out startPoint);
        NavStatus status1 = query.GetNearestPoint(endPos, Vector3.one, mCrowdManager.QueryFilter, out endPoint);

        Debug.Log("Find path from" + startPoint.point.ToString() + "To" + endPoint.point.ToString());

        generateNavPath(startPoint, endPoint);
        return(true);
    }
Ejemplo n.º 2
0
 public NavStatus GetNavMeshPoint(Vector3 position, oVector3 extents, out NavmeshPoint point)
 {
     return(_query.GetNearestPoint(position.ToCAIVector3(), extents, _filter, out point));
 }