public void OffsetCountry(ref Vector2[,] coordinateGrid) { for (int y = 0; y < coordinateGrid.GetLongLength(0); y++) { for (int x = 0; x < coordinateGrid.GetLongLength(1); x++) { float currentLocationValue = Mathf.PerlinNoise(x + ruralMapOffset.x, y + ruralMapOffset.y); coordinateGrid[x, y] = coordinateGrid[x, y] + Vector2.one * Random.Range(Mathf.Lerp(1, 0, currentLocationValue * 2) * -countryOffset, Mathf.Lerp(1, 0, currentLocationValue * 2) * countryOffset); } } }