void Update()
{
float h = Input.GetAxis("Horizontal");
float v = Input.GetAxis("Vertical");
transform.Translate(new Vector3(0, 0, v) * 5f * Time.deltaTime);
transform.Rotate(Vector3.up * h * Time.deltaTime * 60f);
}
unity使用WASD最简单的控制移动方式
猜你喜欢
转载自blog.csdn.net/qq_38513810/article/details/129295154
今日推荐
周排行