Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

Random generation of Asteroids

$
0
0
Hello, i want to generate an Astroid field. I want to place them at random places around a coordinate with a max and min amount of asteroids or something like that. I found the instantiate command but im not sure how i would make the center var and the random range from that. And how do i make it so the "SpawnLoop" only runs as long as i want asteroids to be generated.I have 5 diffrent Asteroid Prefabs that i want to randomly choose from. And is there a way to only spawn in places that are far enough away from other asteroids? I know these are alot of questions but it would be very helpful if someone can explain and help me with those. Thanks in advance.

Viewing all articles
Browse latest Browse all 171066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>