void Update () { Debug.Log("Horizontal value:" + Input.GetAxis("Horizontal")); Vector3 direction = Input.GetAxis("Horizontal") * transform.right + Input.GetAxis("Vertical") * transform.forward; transform.position = transform.position + walkSpeed * direction * Time.deltaTime; }
1 回答
- 1 回答
- 0 关注
- 802 浏览
添加回答
举报
0/150
提交
取消