Horje
instantiate object in circle Code Example
instantiate object in circle
 float radius = 1f;
 int amountToSpawn;
 for (int i = 0; i < amountToSpawn; i++)
 {
     float angle = i * Mathf.PI*2f / amountToSpawn;
     Vector3 newPos = new Vector3(Mathf.Cos(angle)*radius, y, Mathf.Sin(angle)*radius);
     GameObject go = Instantiate(GameObject.CreatePrimitive(PrimitiveType.Cube), newPos, Quaternion.identity);
 }




Csharp

Related
c# restclient timeout Code Example c# restclient timeout Code Example
c# how does comparing datetime work Code Example c# how does comparing datetime work Code Example
instantiate unity 2d in parent Code Example instantiate unity 2d in parent Code Example
wpf resource dictionary Code Example wpf resource dictionary Code Example
c# add element to array Code Example c# add element to array Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11