Unity 中的 OverlapBox 方法的参数顺序如下:

public static int OverlapBox(Vector3 center, Vector3 halfExtents, Quaternion orientation, int layerMask = DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal);
  • center:盒子中心点的坐标。
  • halfExtents:盒子每个轴上的半长,即 x 轴、y 轴、z 轴上的长度的一半。
  • orientation:盒子的旋转方向,使用四元数表示。
  • layerMask:物体所在的层,只有在该层的物体才会被检测到。默认为 DefaultRaycastLayers。
  • queryTriggerInteraction:是否检测触发器。默认为 UseGlobal,表示使用全局设置。
unity 中 OverlapBox的顺序是什么

原文地址: https://www.cveoy.top/t/topic/bbmY 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录