public void changeResolution(float newResolution) { voxelsPerChunk = (int)newResolution; resolution = (float)voxelsPerChunk / chunkSize; cS = voxelsPerChunk + overlap; sculp = new sculpting(chunkSize, voxelsPerChunk, overlap, 0.3f, Player.GetComponent <materials>()); }
void Start() { for (int i = 0; i < 10; i++) { ore oreTemp = oreTemplates[UnityEngine.Random.Range(0, oreTemplates.Length)]; orePoint oreP = new orePoint(oreTemp.material, oreTemp.radius, new Vector3(UnityEngine.Random.Range(-40, 40), UnityEngine.Random.Range(-40, 0), UnityEngine.Random.Range(-40, 40))); ores.Add(oreP); } if (random) { seed = UnityEngine.Random.Range(-1000000, 1000000); } resolution = (float)voxelsPerChunk / chunkSize; //biomes.changeSeed(seed); float freq = 2 / scale / resolution; cS = voxelsPerChunk + overlap; sculp = new sculpting(chunkSize, voxelsPerChunk, overlap, 0.3f, materials); generation = new voxGeneration(cS, resolution, seed, freq); }