Recast: add note to detail vert height offset

This commit is contained in:
Kawe Mazidjatari 2024-08-22 16:00:45 +02:00
parent 9b1651420c
commit fc1bfa8bfe

View File

@ -1407,6 +1407,10 @@ bool rcBuildPolyMeshDetail(rcContext* ctx, const rcPolyMesh& mesh, const rcCompa
{
verts[j*3+0] += orig[0];
verts[j*3+1] += orig[1];
// note(amos): the offset appears to be necessary, otherwise BVTrees
// are built below the polygon.
// see https://github.com/recastnavigation/recastnavigation/issues/647
verts[j*3+2] += orig[2] + chf.ch; // Is this offset necessary?
}
// Offset poly too, will be used to flag checking.