Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void GenerateHeightMap()
- {
- for (int x = 0; x < mapWidth; ++x)
- for (int y = 0; y < mapHeight; ++y)
- for (int z = 0; z < mapLength; ++z)
- {
- int heights = (int)perlin.FractalNoise2D (x/scale,z/scale,10,3.6f,10f);
- if(heights > 0)
- {
- blocks[x,y,z] = blocks[x,heights+y,z];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement