RaycastHit hit; Ray ray = Camera.mainCamera.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(ray, out hit, 100)) { spheretransform.position = hit.point; <