public Vector2 calculate(Vector2 target) {
		double distToClosest = Double.MAX_VALUE;
		Vector2 bestHidingSpot = null;
		Obstacle closest;
		
		for(Obstacle curObj : obstacles) {
			Vector2 hidingSpot = getHidingPosition(curObj.position,
					curObj.boundingRadius,
					target);
			float dist = Vector2.Vec2DistanceSq(hidingSpot, entity.position);
			
			if(dist < distToClosest) {
				distToClosest = dist;
				bestHidingSpot = hidingSpot;
				closest = curObj;
			}
		}
		if(distToClosest == Double.MAX_VALUE) //no obstacles
			return flee.calculate(target);
		
		return arrive.calculate(bestHidingSpot);
	}