在主视角摄像机(带有Camera组件的相机)上添加Physics Raycaster组件 推荐观看这篇文章对症下药https://blog.csdn.net/wealupa/article/details/117604939