Код:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class WorldGen : MonoBehaviour {
public int sizeX;
public int sizeZ;
public int Height;
public GameObject cur_block;
private void Start(){
GenerateW();
}
private void GenerateW(){
for (int x = 0; x < sizeX; x++){
for(int z = 0; z < sizeZ; z++){
float y = Mathf.PerlinNoise (x/2, z/2) * Height;
Instantiate (cur_block, new Vector3(x,y,z), Quaternion.identity);
}
}
}
}
В Debug log'e : y: 2.5.... Все на одной высоте.