忽然笑
var ray = Camera.main.ScreenPointToRay (Input.mousePosition);var hit : RaycastHit;if (Physics.Raycast (ray, hit, 100)) {var target: GameObject = hit.collider.gameObject//获得点击的物体if(Input.getMouseButtonDown("0")){target.transform.position = (Input.mousePosition);}}先获取鼠标坐标然后再发射射线检测