unity Physics.BoxCast说明

public static bool BoxCast (Vector3 center, Vector3 halfExtents, Vector3 direction, Quaternion orientation= Quaternion.identity, float maxDistance= Mathf.Infinity, int layerMask= DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction= QueryTriggerInteraction.UseGlobal);

center 盒体的中心。
halfExtents 盒体各个维度大小的一半。
direction 投射盒体的方向。
orientation 盒体的旋转。
maxDistance 投射的最大长度(=0时表示只计算盒体内投射,>0时表示从盒体的边缘向drection投射的距离)。
layerMask 层遮罩,用于在投射胶囊体时有选择地忽略碰撞体。
queryTriggerInteraction 指定该查询是否应该命中触发器。

原文地址:https://www.cnblogs.com/kingBook/p/12467643.html