Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

smooth rotation unity


float turnTime = 50f;
Quaternion target = Quaternion.Euler(mainCamera.eulerAngles.x, mainCamera.eulerAngles.y, 0f);
transform.rotation = Quaternion.RotateTowards(transform.rotation, target, turnTime * Time.deltaTime);

Source by nullorempty.org #
 
PREVIOUS NEXT
Tagged: #smooth #rotation #unity
ADD COMMENT
Topic
Name
4+2 =