Unity Layers与LayerMask理解

LayerMask一般用于Physics.Raycast光线投射 先看下Raycast函数的参数 public static bool Raycast(Ray ray, out RaycastHit hitInfo, float maxDistance, int layerMask); 他还有很多重载函数 ray:射线的起点和方向 hitInfo:如果返回true,hitInfo将包含碰到器碰撞的
相关文章
相关标签/搜索