Hi there,
I am focussing the camera on an object using transform.LookAt. Now after that I want to 0 the z-axis to always have it straight. The problem is that I am doing this using:
transform.rotation=Quaternion.Euler(transform.rotation.x,transform.rotation.y,0);
But this always rotates the camera back to the initial rotation it had. Why is that? is transform.rotation giving back the rotation as it is before the LookAt? How to get the values after it?
Greetings