Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity smooth rotation 2d

 float targetAngle = 90;
 float turnSpeed = 5;
 transform.rotation = Quaternion.Slerp (transform.rotation, Quaternion.Euler (0, 0, targetAngle), turnSpeed * Time.deltaTime);
 
PREVIOUS NEXT
Tagged: #unity #smooth #rotation
ADD COMMENT
Topic
Name
6+2 =