using UnityEngine;
using System.Collections;
public class Move3 : MonoBehaviour {
public float moveSpeed = 5f;
public float turnSpeed = 180f;
CharacterController _cc;
// Use this for initialization
void Start () {
_cc = GetComponent<CharacterController> (); //CharacterController 값을 받아와라.
}
// Update is called once per frame
void Update () {
float h = Input.GetAxis ("Horizontal");
float v = Input.GetAxis ("Vertical");
//_cc.Move (new Vector3 (0f, 0f, v) * moveSpeed * Time.deltaTime);
_cc.Move (transform.forward *v * moveSpeed * Time.deltaTime);
transform.Rotate (0f, h * turnSpeed * Time.deltaTime, 0f);
// Local 좌표축과 글로벌 좌표가 달라서....
}
}