Rotating Camera on click and drag
So I have a working script for rotating the camera on click and drag, This is my script : if(Input.GetMouseButton(0)){ xRotation += Input.GetAxis("Mouse X") * swipelookSensitivity * 0.02f; yRotation -= Input.GetAxis("Mouse Y") * swipelookSensitivity * 0.02f; yRotation = Mathf.Clamp(yRotation, -85, 85); } void Update () { smoothXRotation = Mathf.SmoothDamp (smoothXRotation, xRotation, ref smoothXRotationSpeed, lookSmoothDamp); smoothYRotation = Mathf.SmoothDamp (smoothYRotation, yRotation, ref smoothYRotationSpeed, lookSmoothDamp); desiredRotation = Quaternion.Euler(smoothYRotation, smoothXRotation, 0); currentRotation = transform.rotation; transform.rotation = desiredRotation; }
When i run the game in android too, it works fine... but the thing is when i use my joystick, the Input.GetAxis("mouse X") value changes in respect to the click on the joystick... I don't prefer to use Input.touches because I can't get the unity remote to work... Any help is appreciated.