rotation x axis space game problem, can only rotate 1 way

i just starting out with building the basis of a space game with mouse controls and keyboard, i have my W as throttle and mouse for rotation, my problem is though that now i can only turn UP (moving my mouse down as intended) but i cannot get it to go abive 0 in my “yew” igt goes to minus perfectly fine, but i cannot get my space craft to “dive” :confused: my code is as follow:

    public float yew = 0f;
    public float yewMax = 0f;  

//yewing
       if(engineOn == true){
         yew += Input.GetAxis("Mouse Y") * 50f * Time.deltaTime;
       }

       yew = Mathf.Max(Mathf.Min(yew,yewMax),(-45f));
       transform.Rotate(yew*Time.deltaTime,0,0);

       if(yew > 0  Input.GetAxis("Mouse Y") == 0f){
         yew-=Time.deltaTime * 10f;
         yew = Mathf.Max(yew,0);
       }

Any help would be apreaciated ^^ im still VERY new to unity and coding in general so be gentle hehe! Best regards Martin

It might be best to simply utilize the keyboard to steer by getting input from some axes defined in editor/input or use the mouseLook script that may or may not be included by default with unity (I forget). I’ll be sure to post my ship driver script so you can take a look at that.

For using the mouse to steer: did you make sure to specify the positive AND negative inputs in the mouse y axis? If you only have one then that will definitely cause problems.