public static void OverlapCapsule <T>(Vector3 point0, Vector3 point1, float radius, List <T> list, int layerMask = -5, QueryTriggerInteraction triggerInteraction = 1) where T : Component { layerMask = GamePhysics.HandleTerrainCollision(point0, layerMask); layerMask = GamePhysics.HandleTerrainCollision(point1, layerMask); GamePhysics.BufferToList <T>(UnityEngine.Physics.OverlapCapsuleNonAlloc(point0, point1, radius, GamePhysics.colBuffer, layerMask, triggerInteraction), list); }
public static void OverlapOBB( OBB obb, List <Collider> list, int layerMask = -5, QueryTriggerInteraction triggerInteraction = 1) { layerMask = GamePhysics.HandleTerrainCollision((Vector3)obb.position, layerMask); GamePhysics.BufferToList(Physics.OverlapBoxNonAlloc((Vector3)obb.position, (Vector3)obb.extents, GamePhysics.colBuffer, (Quaternion)obb.rotation, layerMask, triggerInteraction), list); }
public static void OverlapSphere( Vector3 position, float radius, List <Collider> list, int layerMask = -5, QueryTriggerInteraction triggerInteraction = 1) { layerMask = GamePhysics.HandleTerrainCollision(position, layerMask); GamePhysics.BufferToList(Physics.OverlapSphereNonAlloc(position, radius, GamePhysics.colBuffer, layerMask, triggerInteraction), list); }
public static void OverlapOBB <T>(OBB obb, List <T> list, int layerMask = -5, QueryTriggerInteraction triggerInteraction = 1) where T : Component { layerMask = GamePhysics.HandleTerrainCollision(obb.position, layerMask); GamePhysics.BufferToList <T>(UnityEngine.Physics.OverlapBoxNonAlloc(obb.position, obb.extents, GamePhysics.colBuffer, obb.rotation, layerMask, triggerInteraction), list); }
public static void OverlapBounds <T>(Bounds bounds, List <T> list, int layerMask = -5, QueryTriggerInteraction triggerInteraction = 1) where T : Component { layerMask = GamePhysics.HandleTerrainCollision(bounds.center, layerMask); GamePhysics.BufferToList <T>(UnityEngine.Physics.OverlapBoxNonAlloc(bounds.center, bounds.extents, GamePhysics.colBuffer, Quaternion.identity, layerMask, triggerInteraction), list); }