(c# source request) how to spawn a few bottom objects in a spiral to create a simple terrain?

hey dear community!

i want to create an automatic object spawner, wich will place object plates to create a ground.
im now currently working on the solution for about 3 days but i dont get it to work(im super new to unity)
however i already got a simple spawner script to work, wich will place one object at the location of a empty game object:)
but i dont get how to place objects at fixed or calculated locations. my current script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class spawn : MonoBehaviour {
    public GameObject ObjToSpawn;

	// Use this for initialization
	void Start () {
        Instantiate(ObjToSpawn, transform.position, transform.rotation);
	}
	
	// Update is called once per frame
	void Update () {
		
	}
}

![alt text][1]

Anyways my goal is to create a script wich will be able to generate a pattern like on the picture
i want to be able to set the amount of placed objects and to add a list like 3 different objects to let the generator script choose from to generate more random:)

could someone help me?:slight_smile:

Good day.

It simple, you only need to change the transform.position every time. Create 2 variables, one for XCoord, another for Zcoord. Then do the Instantiate replacing the position for this vector.

Position = new Vector3 (X, 0, Z);
Position = new Vector3 (X+200, 0, Z);
Position = new Vector3 (X+200, 0, Z+200);
Position = new Vector3 (X, 0, Z+200);
Position = new Vector3 (X-200, 0, Z+200);
Position = new Vector3 (X-200, 0, Z);
Position = new Vector3 (X-200, 0, Z-200);
Position = new Vector3 (X, 0, Z-200);
Position = new Vector3 (X+200, 0, Z-200);
Position = new Vector3 (X,+400 0, Z-200);
Position = new Vector3 (X+400, 0, Z);

etc…

If you are smatr, you can easy create an automatic progression, if notm, do it by hand.

Bye!