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# Get all class by namespace 
Csharp :: c# multiline comment 
Csharp :: hide button unity 
Csharp :: how to start a webpage from a button c# 
Csharp :: what is type unity 
Csharp :: clear gridview data in c# 
Csharp :: Configure Automapper 
Csharp :: how to convert date to Complete ISO-8601 date in c# 
Csharp :: update squence c# 
Csharp :: c# console clear 
Csharp :: c# linq select only unique values from list 
Csharp :: instantiate unity 2d in parent 
Csharp :: unity ihandler click right button 
Csharp :: join two array c# 
Csharp :: windows form textbox password 
Csharp :: get sha1 of file c# 
Csharp :: c# clear all textboxes 
Csharp :: instantiate a player in photon 
Csharp :: C# monogodb 
Csharp :: c# radio button checked 
Csharp :: how to make a character run in unity 
Csharp :: on collision enter by layer 2d unity 
Csharp :: .net core web app get dll name 
Csharp :: Long, Max and Min value 
Csharp :: unity notification 
Csharp :: if debug c# 
Csharp :: click in vue 
Csharp :: how to locate a specific element in a list c# 
Csharp :: export list to excel c# 
Csharp :: if viewbag is null 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =