Hello, everyone. I am making a game where I want some prefab cubes to be continuously spawned around a bigger cube; kind of like the rings of a planet. The problem is: the bigger cube is continuously growing in size, therefore more objects must be spawned around a larger area/circumference. How would I do this? (possibly an expanding ring shaped spawn area?) Thanks!

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));
}
```