Unity Layers與LayerMask理解

LayerMask一般用於Physics.Raycast光線投射 先看下Raycast函數的參數 public static bool Raycast(Ray ray, out RaycastHit hitInfo, float maxDistance, int layerMask); 他還有很多重載函數 ray:射線的起點和方向 hitInfo:如果返回true,hitInfo將包含碰到器碰撞的
相關文章
相關標籤/搜索