- Home /
What's wrong with this code? Perlin Noise
I make this code... Perlin Noise + spacing, but spacing don't work. What's wrong?
private var rot : Quaternion;
rot.eulerAngles = Vector3(0, 0, 0);
var terraincube: GameObject;
var spacing = 1;
function Start (){
for (var px:float = 0; px < 80; px ++){
for (var py:float = 0; py< 80; py ++){
var Perlin1 = Mathf.PerlinNoise(px/30, 60) * spacing;
var Perlin2 = Mathf.PerlinNoise(py/30, 60) * spacing;
Instantiate(terraincube, Vector3(py-50, Perlin1*40*Perlin2, px-50), rot);
}
}
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613092030im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Perlin noise tutorials ? 2 Answers
Perlin Noise Plane Manipulation 1 Answer
How to shorten the distance between objects in an array? 1 Answer
Basics of Perlin Noise? 1 Answer
easy c# Simplex Noise script code 1 Answer