Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

how to change rotate with script unity

var rotationVector = transform.rotation.eulerAngles;
rotationVector.z = 0;  //this number is the degree of rotation around Z Axis
transform.rotation = Quaternion.Euler(rotationVector);
//if you put this in a coroutine and yielding for some amount of time 
//you can have something like a rotating loading icon
Comment

PREVIOUS NEXT
Code Example
Csharp :: double to int c# 
Csharp :: photon how to destroy object 
Csharp :: unity how to summon an object with code 
Csharp :: c# change colour of console 
Csharp :: c# quit 
Csharp :: C# reflection invoke static generic method 
Csharp :: set active text unity 
Csharp :: unity open website url 
Csharp :: mouse click unity raycast unity 
Csharp :: unity find closest point on line 
Csharp :: how to make a dragable object in unity2D 
Csharp :: Considerando um projeto C# e o uso do Entity Framework, após realizar uma alteração em um registro, qual o método que deve ser chamado para salvar as 
Csharp :: unity button addlistener 
Csharp :: c# how to output in between 0 - 100 in an int array 
Csharp :: how to log out of unity asset store 
Csharp :: after each vue router 
Csharp :: unity input.getkeyup not working 
Csharp :: oncollisionenter 
Csharp :: c# add 1 
Csharp :: remove character from string c# 
Csharp :: c# loop 
Csharp :: checkbox value unchecked after return view model 
Csharp :: get rigidbody component unity 
Csharp :: how to take user input in string in c# 
Csharp :: c# get all class properties 
Csharp :: how to add reference to rigidbody 2d 
Csharp :: increase variable C# 
Csharp :: unity making a coroutine wait until another coroutine is done 
Csharp :: c# font bold set 
Csharp :: ubuntu: how to open the terminal from c# 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =