Answers for "How to Make an Expanding Spawn Area for Prefabs?"
http://answers.unity.com/questions/1522441/how-to-make-an-expanding-spawn-area-for-prefabs.html
The latest answers for the question "How to Make an Expanding Spawn Area for Prefabs?"Answer by Trevdevs
http://answers.unity.com/answers/1522781/view.html
If these cubes are purely aesthetic and don't need to be interacted with you could use a particle system and under the velocity tab play with the orbital velocity.
Here's a video that demonstrates it :)
https://www.youtube.com/watch?v=J3vFCpZ-ImsWed, 27 Jun 2018 15:00:23 GMTTrevdevsAnswer by ahstein
http://answers.unity.com/answers/1522452/view.html
Define your spawn region in polar coordinates (radius, angle) around the center of your cube. Spherical coordinates if you're working in 3D. You can easily expand the radius to be either the size of the cube times some factor or plus some factor. You can spawn at random angles or according to some pattern.
You'll need to include a conversion from polar/spherical coordinates to Cartesian coordinates, though.
Vector2 PolarToCart (float r, float theta) {
return new Vector2(r * Mathf.Cos(theta),
` r* Mathf.Sin(theta));
}
Vector3 SphericaltoCart (float r, float theta, float phi) {
return new Vector3(r * Mathf.Cos(theta)*Mathf.Sin(phi),
r*Mathf.Sin(theta)*Mathf.Sin(phi),
r*Mathf.Sin(phi));
}Tue, 26 Jun 2018 20:21:15 GMTahstein