Quantcast
Browsing all 4 articles
Browse latest View live

Answer by J8Ptt

Random.Range() returns a float value, but you are using it as an array index (which is an int value). Maybe that's the problem? Try rounding the output of random: var spawnpoint : Transform =...

View Article


Answer by syclamoth

If you want to spawn in a random position, try using something like this: // having determined the spawnPoint, get a random point in a circle: var randomCircle : Vector2 = Random.insideUnitCircle; var...

View Article


Answer by J8Ptt

Random.Range() returns a float value, but you are using it as an array index (which is an int value). Maybe that's the problem? Try rounding the output of random: var spawnpoint : Transform =...

View Article

Answer by syclamoth

If you want to spawn in a random position, try using something like this: // having determined the spawnPoint, get a random point in a circle: var randomCircle : Vector2 = Random.insideUnitCircle; var...

View Article
Browsing all 4 articles
Browse latest View live