unity set rotation towards position code example
Example 1: unity how to change rotation
transform.eulerAngles = new Vector3(0f, 180f, 0f); //rotates 180 degrees
Example 2: unity rotate towards
Quaternion.RotateTowards(Quaternion from, Quaternion to, float maxDegreesDelta);
Example 3: how to reset rotation in unity
transform.rotation = Quaternion.identity;