Hi!!
I want to clone objects but using the initial position of gameObjectEmpty, the problem is that I also want to clone objects in a cylindrical array.
var numberOfObjects = 5;
var radius = 5;
var nameToClone : String;
var positionClone : Transform;
function Start () {
var obj : GameObject = gameObject.Find(nameToClone);
for (var i = 0; i < numberOfObjects; i++) {
var angle = i * Mathf.PI * 2 / numberOfObjects;
var distance = i * 30;
var pos = Vector3 ( Mathf.Cos(angle), 0, Mathf.Sin(angle)) * radius;
Instantiate(obj, pos, Quaternion.identity);
}
}
Thank for all