Quick answer: Pass QueryTriggerInteraction.Collide to include triggers explicitly. Verify the layer mask covers the target layers. Call Physics.SyncTransforms() before the query if you moved colliders this frame.

Here is how to fix Unity OverlapSphere returning empty arrays or missing specific Rigidbodies you can clearly see inside the radius. Three things commonly cause this: trigger exclusion, wrong layer mask, and stale physics state from un-synced transforms.

The Symptom

Calling Physics.OverlapSphere(pos, radius) returns fewer Colliders than visible inside the sphere. Toggle the gizmo wireframe; the sphere overlaps obvious targets that the array does not contain.

What Causes This

Triggers excluded. Default behavior depends on project setting Queries Hit Triggers. If false, triggers are not returned. Always pass interaction explicitly.

Layer mask too narrow. The default mask of -1 (Everything) sometimes gets overridden by a script. A mask of 0 returns nothing.

Transform not synced. If you moved a collider this frame and Auto Sync Transforms is off, the broadphase has stale data.

The Fix

Step 1: Pass interaction and mask explicitly.

int mask = LayerMask.GetMask("Enemies", "Pickups");
Collider[] hits = Physics.OverlapSphere(transform.position, 5f, mask, QueryTriggerInteraction.Collide);
Debug.Log($"Hit {hits.Length} colliders");

Step 2: Sync transforms before the query.

// If you teleported or moved Rigidbodies this frame:
Physics.SyncTransforms();
Collider[] hits = Physics.OverlapSphere(pos, radius);

Step 3: Use the non-allocating variant for hot paths.

private static Collider[] buffer = new Collider[32];

int count = Physics.OverlapSphereNonAlloc(pos, radius, buffer, mask, QueryTriggerInteraction.Collide);
for (int i = 0; i < count; i++)
{
    // process buffer[i]
}

Avoids per-frame allocation that Unity GC charges for the array.

Step 4: Verify with Debug.DrawWireSphere.

void OnDrawGizmos()
{
    Gizmos.color = Color.red;
    Gizmos.DrawWireSphere(transform.position, queryRadius);
}

Visual confirmation lets you see whether the sphere actually overlaps what you think it does.

Step 5: For 2D, use Physics2D.OverlapCircle. 3D OverlapSphere does not see 2D colliders. Mixing pipelines requires querying each separately.

Performance Note

OverlapSphere is fast but allocates an array per call. NonAlloc avoids GC pressure. For per-frame queries on many actors, NonAlloc is mandatory; otherwise allocations dominate.

“Layer mask + trigger interaction + synced transforms. Three knobs that fix most empty-result OverlapSpheres.”

Related Issues

For physics overlap returning stale results, see OverlapBox Stale Results. For trigger detection, see Trigger Collider Not Detecting.

Mask, interaction, sync, NonAlloc. Four habits, every overlap query.