What about Input.GetAxis() ?
Input.GetAxis("Mouse X"); Input.GetAxis("Mouse Y");
For more information:
Returns the value along axisName of the virtual axis.
For input from the keyboard or joystick, the value will lie in the range -1 ... 1. The range is not -1 ... 1.
It does not depend on the frame rate. When using this value, there is no need to worry about changing the frame rate.
using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { public float horizontalSpeed = 2.0F; public float verticalSpeed = 2.0F; void Update() { float h = horizontalSpeed * Input.GetAxis("Mouse X"); float v = verticalSpeed * Input.GetAxis("Mouse Y"); transform.Rotate(v, h, 0); } }
Source of
(Just in case, you can adjust the sensitivity in Edit → Project Settings → Input.)