New answers tagged

0

Modified from the unity docs: //creates a position between -10 to 10 on the x-axis float randomRange = Random.Range(-10.0f, 10.0f); Vector3 randomPosition = new Vector3(randomRange, 0, 0); var alexsObstacle = Instantiate( AlexsObstaclePrefab, randomPosition, Quaternion.identity);


Top 50 recent answers are included