Version: 2017.1
public static float GetAxis (string axisName);

Description

Возвращает значение по axisName виртуальной оси.

The value will be in the range -1...1 for keyboard and joystick input. If the axis is setup to be delta mouse movement, the mouse delta is multiplied by the axis sensitivity and the range is not -1...1.

Это не зависит от частоты кадров. При использовании данного значения нет необходимости беспокоиться об изменении частоты кадров.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public float speed = 10.0F; public float rotationSpeed = 100.0F; void Update() { float translation = Input.GetAxis("Vertical") * speed; float rotation = Input.GetAxis("Horizontal") * rotationSpeed; translation *= Time.deltaTime; rotation *= Time.deltaTime; transform.Translate(0, 0, translation); transform.Rotate(0, rotation, 0); } }
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); } }