Recast: fix regression in geometry raycaster

After the implementation of brush intersection detection in commit 6fa5080fe51e2ea118f2cf4f922bcb6e815b3a9f, we return out as soon as we have a hit, even when tmin is provided. But if tmin is provided, the caller is interested in finding the closest intersection so we must go over the input mesh as well. This fixes a bug of raycasts going through geometry when there's a brush behind it.
This commit is contained in:
Kawe Mazidjatari 2024-10-19 12:02:53 +02:00
parent 9ebecbee20
commit b28b167467

View File

@ -557,8 +557,8 @@ bool InputGeom::raycastMesh(const float* src, const float* dst, const unsigned i
if (tmin)
*tmin = isectTmin;
return true;
else
return true;
}
const bool traceWorld = mask & TRACE_WORLD;