都是移动(接金币)
float h = Input.GetAxis ("Vertical");
transform.Translate (Vector3.right * h * Time.deltaTime * 5f);
float v = Input.GetAxis ("Horizontal");
transform.Translate (-Vector3.forward * v * Time.deltaTime * 5f);前后移动,左右旋转(类似于坦克)
float h = Input.GetAxis ("Horizontal");//旋转
transform.Rotate (Vector3.up * h * Time.deltaTime * rotateSpeed);
float v = Input.GetAxis ("Vertical");//移动
transform.Translate (Vector3.forward * v * Time.deltaTime * moveSpeed);
986

被折叠的 条评论
为什么被折叠?



