圓柱體範圍判定

物理
伺服器端與客戶端
可在 Mobile 端和 PC 端使用

判斷目標實體是否在規定的圓柱體範圍內,如果實體沒有位置屬性,會回傳假

聲明

func IsInsideCylinder(target entity, center Vector3, radius float, height float, rotation Vector3) bool
go

參數

輸入

名稱 類型 描述
目標 entity 目標實體
中心 Vector3 規定圓柱體的中心點
半徑 Float 規定圓柱體的截面半徑
高度 Float 規定圓柱體的高度
旋轉歐拉角 Vector3 規定圓柱體繞中心點的三維旋轉歐拉角

返回

類型 描述
Bool 判定結果