// set rotation angles (local coordinates) of an object gameObject.transform.eulerAngles = new Vector3(xAngle, yAngle, zAngle); // rotate object by given values gameObject.transform.Rotate(xDiff, yDiff, zDiff);