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*, 0);*

}
}
If you need to see more of my code let me know.

2 Answers

2

Hi, take a look at this question: Perlin noise continuous through different objects - Questions & Answers - Unity Discussions. 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.

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. * http://video.unity3d.com/video/7720450/tutorials-using-unity-answers * http://answers.unity3d.com/page/faq.html Edit : just noticed how old this question is. Converting Saitodepaula to an answer and accepting.