- Home /
How to make perlin noise generate terrain in all directions?
I have the perlin noise coded and I have it instantiating the object but how do I make it instantiate in all directions?
public void Start ()
{
ground = GameObject.Find("Ground");
float[] perlinNoise = GeneratePerlinNoise(GenerateWhiteNoise(cubesToGenerate), 5);
for(int i = 0; i < cubesToGenerate; i++)
{
GameObject gObject = (GameObject) Instantiate(ground);
gObject.transform.position = new Vector3(i, 4*perlinNoise[i], 0);
}
}
If you need to see more of my code let me know.
Answer by Saitodepaula · Aug 10, 2012 at 02:12 PM
Hi, take a look at this question: http://answers.unity3d.com/questions/298703/perlin-noise-continuous-through-different-objects.html. It is not exactly what you asked, but I applied Perlin noise to different objects (planes). After that, it is not difficult to generate objects infinitely in all directions.
Answer by joppe · Mar 22, 2013 at 12:17 PM
Make it the code 3 times for left, right and height SRY i don't have the code.
Look, I'm sorry to be blunt, but how is this an answer? It's nice that you want to help, but if this is the extent of your help at least just post a comment. You won't get a negative vote for a comment, but an answer this shallow and vague ....
To the OP : The comment by Saitodepaula has a lot more relevant information.
Edit : just noticed how old this question is. Converting Saitodepaula to an answer and accepting.
Your answer
![](https://koobas.hobune.stream/wayback/20220612224158im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Checking if object intersects? 1 Answer
Basics of Perlin Noise? 1 Answer
Perlin Noise Plane Manipulation 1 Answer
easy c# Simplex Noise script code 1 Answer
Using noise as texture 2 Answers