Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

how to make game objects spread in a specific vector

 float radius = 1f;
 for (int i = 0; i < 8; i++)
 {
     float angle = i * Mathf.PI*2f / 8;
     Vector3 newPos = new Vector3(Mathf.Cos(angle)*radius, y, Mathf.Sin(angle)*radius);
     GameObject go = Instantiate(GameObject.CreatePrimitive(PrimitiveType.Cube), newPos, Quaternion.identity);
 }
Comment

PREVIOUS NEXT
Code Example
Typescript :: Passing Data between fragments in Android using Interface 
Typescript :: FIFA 21 esports temas 
Typescript :: typescript list 
Typescript :: typescript set 
Typescript :: react update state array of objects hooks 
Typescript :: how to register a static assets folder spring boot 
Typescript :: typescript where to put interfaces 
Typescript :: returning objects in alphabetical order in ruby 
Typescript :: fwrite() expects parameter 2 to be string, array given 
Typescript :: find number of digits that changed after addition of 1 
Typescript :: how to make auto conversion of blogger texts with fonts installed in blog theme 
Cpp :: 0009:err:mscoree:CLRRuntimeInfo_GetRuntimeHost Wine Mono is not installed 
Cpp :: c++ measure time 
Cpp :: best c++ pdf 
Cpp :: min priority queue c++ 
Cpp :: how to print in c++ 
Cpp :: sort a vector of strings according to their length c++ 
Cpp :: c++ count bits 
Cpp :: c++ custom comparator for elements in set 
Cpp :: how to print hello world in c++ 
Cpp :: print array c++ 
Cpp :: hide terminal window c++ 
Cpp :: c++ for loop 
Cpp :: ue4 ftext to int 
Cpp :: prints all the keys and values in a map c++ 
Cpp :: random in range c++ 
Cpp :: xmake set exe name 
Cpp :: how to access struct variables in c++ 
Cpp :: how to clear screen in C++ console 
Cpp :: convert decimal to binary c++ 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =