public static bool CheckBox (Vector3 center, Vector3 halfExtents, Quaternion orientation= Quaternion.identity, int layermask= DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction= QueryTriggerInteraction.UseGlobal);

参数

center盒体的中心。
halfExtents盒体各个维度大小的一半。
orientation盒体的旋转。
layermask 层遮罩,用于在投射射线时有选择地忽略碰撞体。
queryTriggerInteraction指定该查询是否应该命中触发器。

返回

bool 如果盒体与任何碰撞体重叠,则返回 true。

描述

检查给定的盒体是否与其他碰撞体重叠。

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961