시작하기 전에 나는 단결 멍청하다고 얘기해야합니다. Unity keypress not registered
그래서 나는 탁구 자습서를 다음되었지만, 나는 문제가있다. 화살표를 누르면 라켓이 움직이지 않습니다. 당신이 해결하는 방법을 알고 있다면이 나를내 코드를 알려 주시기 바랍니다 :
using UnityEngine;
using System.Collections;
public class MoveRacket : MonoBehaviour {
// up and down keys (to be set in the Inspector)
public KeyCode up;
public KeyCode down;
void FixedUpdate() {
// up key pressed?
if (Input.GetKey(up)) {
transform.Translate(new Vector2(0.0f, 0.1f));
}
// down key pressed?
if (Input.GetKey(down)) {
transform.Translate(new Vector2(0.0f, -0.1f));
}
}
}
및 제어 따기 옵션 :
실제로 콤보 상자에서 위아래로 할당합니까? –
중복 질문 #http : //stackoverflow.com/questions/26318390/key-input-wont-work-in-unity/26318448에 noredirect = 1 #의 comment41302388_26318448 두 번 질문을하지 마십시오 ... 당신은 할 수 없습니다 다음 답변을 찾을 그냥 몇 시간 동안 기다린 그 후 다시 시도하거나 채팅을 물어 http://chat.stackoverflow.com/rooms/37624/unity3d-developers –