- Home /
 
 
               Question by 
               miramaslow · Nov 27, 2015 at 10:10 AM · 
                c#joystickcamera-looky-axis  
              
 
              5th axis on joystick does not working with the main camera
somehow i can't get the up and down output and keep getting left and right output instead from my 5th axis key and i dont know why. I really wish someone could help me with this. Here's the code
 if (axes == RotationAxes.MouseX)
         {
             if (Xon>.05){
                 transform.Rotate(0, Input.GetAxis("Joy X") * joysensitivityX, 0);
             }
         }
         if(axes == RotationAxes.MouseY)
         {
             if (Yon>.05){
                 rotationY += Input.GetAxis("Joy Y") * joysensitivityY;
             }
             rotationY = Mathf.Clamp (rotationY, minimumY, maximumY);
             transform.localEulerAngles = new Vector3(-rotationY, transform.localEulerAngles.y, 0);    
         }
 
              
               Comment
              
 
               
              Your answer