Physics.SphereCastAll Gives Inconsistent Results

I have some simple code:

    RaycastHit[] line_hits = Physics.RaycastAll(transform.position, transform.right, m_Length, m_LayerCollisionMask);
    RaycastHit[] hits = Physics.SphereCastAll(transform.position, m_Width, transform.right, m_Length, m_LayerCollisionMask);

Since I’m going from the same position, in the same direction for the same length in both a RaycastAll and a SphereCastAll I’d expect the Raycast to be redundant.

However, the I’m seeing the raycast return results that the sphere cast does not. Do sphere casts not return hits with things they start embedded with? Is there anything else that could explain this behavior?

Keep in mind that the sphere cast has a minimum distance depending on the sphere size. You can only hit something with the sphere surface. If something is already in the sphere it will be ignored. Also you can’t rely on a certain order how the objects are returned. That depends on how they are stored in the scene and in which order they are processed.

It seems like this may be the same as issue 622889 which is marked as fixed in a future release. I guess I just have to wait.