Unity 게임 개발 공부 2 - 입력(Input)에 관하여
Unity에서 유닛(Player)가 움직이려면 입력을 잘 넣어줘야한다. 기초적으로는 다음과 같이 넣을 수 있다. if(Input.GetKey(KeyCode.UpArrow) == true){ playerRigidbody.AddForce(0f, 0f, speed); } if(Input.GetKey(KeyCode.DownArrow) == true){ playerRigidbody.AddForce(0f, 0f, -speed); } if(Input.GetKey(KeyCode.RightArrow) == true){ playerRigidbody.AddForce(speed, 0f, 0f); } if(Input.GetKey(KeyCode.LeftArrow) == true){ playerRigidbody.AddForce(-..