using UnityEngine; public class CameraMovement : MonoBehaviour { public float speed = 5.0f; void Update() { // wasd , 방향키를 이용해서 카메라가 이동 할 수 있도록 if (Input.GetKey(KeyCode.UpArrow) || Input.GetKey(KeyCode.W)) { this.transform.Translate(0, speed * Time.deltaTime, 0); } if (Input.GetKey(KeyCode.RightArrow) || Input.GetKey(KeyCode.D)) { this.transform.Translate(speed * Time.deltaTime, 0, 0); } if (Input.GetKey(KeyCode.DownArrow) || Input.GetKey(KeyCode.S)) { this.transform.Translate(0, -speed * Time.deltaTime, 0); } if (Input.GetKey(KeyCode.LeftArrow) || Input.GetKey(KeyCode.A)) { this.transform.Translate(-speed * Time.deltaTime, 0, 0); } } }