smooth rotation unity

96

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);

Comments

Submit
0 Comments