void Update () {
float x = Input.GetAxis ("Horizontal") * Time.deltaTime * speed;
float z = Input.GetAxis ("Vertical") * Time.deltaTime * speed;
transform.Translate (x, 0, z);
print (x);
}
原文:http://www.cnblogs.com/xiajing12345/p/7373764.html