Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在从事游戏项目(射击游戏)
我希望我的播放器有一个射线显示撞击点
The Player ------------> my target
我如何在 untiy5 中使用 C# 来解决这个问题
您需要从相机向前进行光线投射并检查它击中了什么。
当你有两个点(一个是武器/相机,第二个是它击中的地方)时,使用线渲染器将它们与线连接。