Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity rotation

// set rotation angles (local coordinates) of an object
gameObject.transform.eulerAngles = new Vector3(xAngle, yAngle, zAngle);

// rotate object by given values
gameObject.transform.Rotate(xDiff, yDiff, zDiff);
 
PREVIOUS NEXT
Tagged: #unity #rotation
ADD COMMENT
Topic
Name
6+7 =