0
WSAD 버튼을 사용하여 큐브를 이동하려고합니다. 어떤 이유로 든 버튼을 터치하지는 않더라도 대각선으로 왼쪽과 왼쪽으로 이동합니다. 나는 유니티 4.5.1Unity C# - Rigidbody.AddForce가 의도 한대로 작동하지 않습니다.
코드를 사용하고 있습니다 :
이using UnityEngine;
using System.Collections;
public class Movement : MonoBehaviour {
public float moveSpeed;
private Vector3 input;
// Use this for initialization
void Start() {
}
// Update is called once per frame
void Update() {
input = new Vector3(Input.GetAxis ("Horizontal"), 0, Input.GetAxis ("Vertical"));
print(input);
}
}