RaycastHit
时间: 2023-12-08 07:48:19 浏览: 77
RaycastHit是一个存储射线碰撞到的第一个物体的信息的类。在使用射线进行物理碰撞检测时,可以通过创建RaycastHit对象来存储碰撞物体的相关信息。这个类包含了被射线击中的物体、碰撞点、碰撞法线等信息。当调用Physics.Raycast方法时,可以将RaycastHit对象作为参数传递进去,用于存储射线碰撞的结果。如果射线碰撞到了物体,返回值为true,否则返回false。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [RaycastHit了解](https://blog.csdn.net/qq_51046087/article/details/118421256)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *3* [Unity中射线Ray和RaycastHit的简单介绍(以j经营类游戏降中物体的拖动和降落伞为例)](https://blog.csdn.net/weixin_44302602/article/details/89438421)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文