I write a simple script to control a camera with mouse like this:
void Update () {
transform.Rotate (Vector3.right * Input.GetAxisRaw ("Mouse Y") * Time.deltaTime);
transform.Rotate (Vector3.up * Input.GetAxisRaw ("Mouse X") * Time.deltaTime);
}
but the camera is rolling around the Z axis. I think i need to set the Z axis rotation to 0 , but i cant.