Version: 2017.1
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。

描述

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