I've recently just enquired about randomly instantiating a gameobject, but now I've got a problem randomising there position, I've managed to get the position to randomise but this apples to all the instances. I want each instance to have its own random position.
var grass : GameObject;
function Start() {
var grassNum = Random.Range(4, 10);
var position = Vector3(Random.Range(-10, 10), 0, Random.Range(-10, 10));
for (var i = 0; i < grassNum; i++){
Instantiate(grass,position, Quaternion.identity);
}
}
Thanks - C