Setting camera.main rotation

Found the issue. I still have no idea why the debug.log showed incorrect value atm (probably something with how the debug works) but I forgot to terminate (return) the Update function which called this function and then changed the rotation.

Hi,
I seem to not be able to set Camera.main rotation. I can’t image there would be something so quick that would change it between those two lines. Am I doing something wrong?

Camera.main.transform.rotation = new Quaternion(0,0,0,0);
Debug.Log(Camera.main.transform.rotation); (= (0.2, -0.1, 0.0, 1.0))

Unity 4.6.1p2

I doubt Debug.Log has a problem.

1 Like