- Home /
 
               Question by 
               OrlandeuxGamer · Feb 24, 2017 at 09:49 AM · 
                unity 5cameraangleangleseuler angles  
              
 
              My Camera Do Not Limit Its Angles And It Glitches, How I Can Solution It?
 var maxX : float;
 var minX : float;
 
 var CamX : Transform;
 var CamY : Transform;
 
 private var h : float;
 private var v : float;
 
 var sensitivity : float;
 
 function Update()
 {
     v -= Input.GetAxis("Mouse Y") * sensitivity;
     h += Input.GetAxis("Mouse X") * sensitivity;
     
     CamX.eulerAngles.x = v;
     CamY.eulerAngles.y = h;
         
     if(CamX.eulerAngles.x > maxX)
     {
         CamX.eulerAngles.x = maxX;
     }
     if(CamX.eulerAngles.x < minX)
     {
         CamX.eulerAngles.x = minX;
     }
 }
as you can see in the video when i touch minimum abgle it return to the max and the max does not limit the angle
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                