unity rotate camera and not rotate player transform code example
Example: unity rotate object relative to camera
transform.rotation = Quaternion.LookRotation(-Camera.main.transform.forward, Camera.main.transform.up);
transform.rotation = Quaternion.LookRotation(-Camera.main.transform.forward, Camera.main.transform.up);