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 指定該查詢是否應該命中觸發器。

714380-20200312104943261-1871599972.png

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章