There is also limit for tracing/sweeping in the same file:
#define HIT_BUFFER_SIZE 512 // Hit buffer size for traces and sweeps. This is the total size allowed for sync + async tests.
#define HIT_BUFFER_MAX_SYNC_QUERIES 496 // Maximum number of queries to fill in the hit buffer for synchronous traces and sweeps. Async sweeps get the difference (HIT_BUFFER_SIZE - NumberOfHitsInSyncTest).
If you want to know how these limit works take a look at PhysxCollision.cpp → GeomOverlapMultiImp_PhysX function.
Alright, I guess that answers it. Makes some sense, but it’s quite annoying and a very arbitrary-seeming number. I’ll just have to automatically subdivide until I have enough boxes I guess.