Recast: fix bug in dtNavMesh::findNearestPolyInTile (XZY -> XYZ)

Hight should always be on the Z axis.
This commit is contained in:
Kawe Mazidjatari 2024-07-18 17:05:08 +02:00
parent 740c593197
commit 98a8898a43

View File

@ -854,7 +854,7 @@ dtPolyRef dtNavMesh::findNearestPolyInTile(const dtMeshTile* tile,
rdVsub(diff, center, closestPtPoly);
if (posOverPoly)
{
d = rdAbs(diff[1]) - tile->header->walkableClimb;
d = rdAbs(diff[2]) - tile->header->walkableClimb;
d = d > 0 ? d*d : 0;
}
else