예제 #1
0
    public void RandomTargetPos()
    {
        Vector3 targetPos = NavMeshUtils.RandomPointOnMap(NavMesh.AllAreas, _mapPivotReference.localScale.x,
                                                          _mapPivotReference.localScale.z, _mapPivotReference.localScale.magnitude,
                                                          _mapPivotReference.transform.position);

        _agent.SetDestination(targetPos);
    }
예제 #2
0
 public Vector3 GetRandomPointOnMap()
 {
     return(NavMeshUtils.RandomPointOnMap(NavMesh.AllAreas, _mapPivotReference.localScale.x, _mapPivotReference.localScale.z, _mapPivotReference.localScale.magnitude, _mapPivotReference.transform.position));
 }