Vector3 targetRotation = path[i].transform.position - transform.position;
transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.LookRotation(targetRotation), 4f * Time.deltaTime);
//LookRotation points the positive 'Z' side of an object in a specified direction
//FromToRotation creates a rotation that from one direction to another direction
float targetAngle = 90;
float turnSpeed = 5;
transform.rotation = Quaternion.Slerp (transform.rotation, Quaternion.Euler (0, 0, targetAngle), turnSpeed * Time.deltaTime);
float turnTime = 50f;
Quaternion target = Quaternion.Euler(mainCamera.eulerAngles.x, mainCamera.eulerAngles.y, 0f);
transform.rotation = Quaternion.RotateTowards(transform.rotation, target, turnTime * Time.deltaTime);