Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity vector3 example

Vector3 testvector=new Vector3(0,1,1);

- Vector is a mathematical concept that holds both magnitude and direction.
Vector3.right /* (1, 0, 0) */   
Vector2.right /* (1, 0) */
Vector3.left /* (-1, 0, 0) */   
Vector2.left /* (-1, 0) */
Vector3.up /* (0, 1, 0) */      
Vector2.up /* (0, 1) */
Vector3.down /* (0, -1, 0) */   
Vector2.down /* (0, -1) */
Vector3.forward /* (0, 0, 1) */
Vector3.back /* (0, 0, -1) */
Vector3.zero /* (0, 0, 0) */    
Vector2.zero /* (0, 0) */
Vector3.one /* (1, 1, 1) */     
Vector2.one /* (1, 1) */
float length = myVector.magnitude /* Length of this Vector */
myVector.normalized /* Keeps direction, but reduces length to 1 */
Comment

unity new vector3

Vector3 testvector=new Vector3(0,1,1);
Comment

vector3 unity

- Vector is a mathematical concept that holds both magnitude and direction.
Vector3.right /* (1, 0, 0) */   
Vector2.right /* (1, 0) */
Vector3.left /* (-1, 0, 0) */   
Vector2.left /* (-1, 0) */
Vector3.up /* (0, 1, 0) */      
Vector2.up /* (0, 1) */
Vector3.down /* (0, -1, 0) */   
Vector2.down /* (0, -1) */
Vector3.forward /* (0, 0, 1) */
Vector3.back /* (0, 0, -1) */
Vector3.zero /* (0, 0, 0) */    
Vector2.zero /* (0, 0) */
Vector3.one /* (1, 1, 1) */     
Vector2.one /* (1, 1) */
float length = myVector.magnitude /* Length of this Vector */
myVector.normalized /* Keeps direction, but reduces length to 1 */
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# readline char 
Csharp :: C# Http.HttpRequestMessage 
Csharp :: c# set cursor pos 
Csharp :: how c# connection 
Csharp :: c# how to check if a array bool is all true 
Csharp :: c# unescape string 
Csharp :: add a dictionary to another dictionary c# 
Csharp :: make command prompt hidden c# 
Csharp :: update listbox using class c# 
Csharp :: C# redirecttoaction with area 
Csharp :: disable button in android studio 
Csharp :: Long, Max and Min value 
Csharp :: c# video to frames 
Csharp :: unity c# struct 
Csharp :: c# struct 
Csharp :: is number c# 
Csharp :: dynamic group by expression C# 
Csharp :: what is a model in c# 
Csharp :: stringbuilder to string c# 
Csharp :: ef core include 
Csharp :: create new object from generic c# 
Csharp :: all Substring of String 
Csharp :: dapper sql builder where 
Csharp :: how to pass id from view to controller in asp.net core 
Csharp :: json serialization 
Csharp :: encrypt with public key and decrypt with private key c# 
Csharp :: list sum c# 
Csharp :: Allow edit in Datagrid C# 
Csharp :: sum of digit of number c# 
Csharp :: C# max rand 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =