unity 實時 獲得螢幕中心點的世界座標

NO IMAGE
Ray ray = Camera.main.ScreenPointToRay(new Vector3(Screen.width/2,Screen.height/2,0));//射線
RaycastHit hit;
if (Physics.Raycast(ray, out hit))//發射射線(射線,射線碰撞資訊,射線長度,射線會檢測的層級)
{ 
sphere.transform.position=new Vector3(hit.point.x,0,hit.point.z);
}