- Home /
Toggle UI 4.6
So I have a toggle and I want it to work with this code.
note this isnt the whole of the code
 public bool invertY = false;
 
 void Update ()
     {
 
         if (axes == RotationAxes.MouseXAndY)
         {
             float rotationX = transform.localEulerAngles.y + Input.GetAxis("Mouse X") * sensitivityX;
             
             rotationY += Input.GetAxis("Mouse Y") * sensitivityY * (invertY ? -1 : 1);
how would I put this into my toggle so when it is checked, the mouse will invert the y axis?
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                