摘要: ray = Camera.main.ScreenPointToRay(Input.mousePosition); if (Input.GetMouseButton(0)) { RaycastHit hit; if (Physics.Raycast(ray, out hit)) { if (hit.t 阅读全文
posted @ 2021-06-05 16:36 All_Nighter 阅读(43) 评论(0) 推荐(0) 编辑
摘要: if(Input.GetMouseButton(1)) {//控制上下左右旋转 obj.transform.Rotate(Vector3.up, -Time.deltaTime * 200 * Input.GetAxis("Mouse X")); obj.transform.Rotate(Vecto 阅读全文
posted @ 2021-06-05 16:35 All_Nighter 阅读(48) 评论(0) 推荐(0) 编辑