diff --git a/src/thirdparty/recast/Detour/Source/DetourNavMeshQuery.cpp b/src/thirdparty/recast/Detour/Source/DetourNavMeshQuery.cpp index a50ca19e..ed130de3 100644 --- a/src/thirdparty/recast/Detour/Source/DetourNavMeshQuery.cpp +++ b/src/thirdparty/recast/Detour/Source/DetourNavMeshQuery.cpp @@ -2712,6 +2712,12 @@ dtStatus dtNavMeshQuery::raycast(dtPolyRef startRef, const float* startPos, cons tile = nextTile; prevPoly = poly; poly = nextPoly; + + if (status & DT_BUFFER_TOO_SMALL) + { + status |= DT_PARTIAL_RESULT; + break; + } } hit->pathCount = n;