diff --git a/RecastDemo/Source/ConvexVolumeTool.cpp b/RecastDemo/Source/ConvexVolumeTool.cpp index f571a04..fd3afb3 100644 --- a/RecastDemo/Source/ConvexVolumeTool.cpp +++ b/RecastDemo/Source/ConvexVolumeTool.cpp @@ -175,7 +175,7 @@ void ConvexVolumeTool::handleClick(const float* p, bool shift) for (int i = 0; i < geom->getConvexVolumeCount(); ++i) { if (pointInPoly(vols[i].nverts, vols[i].verts, p) && - p[1] >= vols[i].hmin, p[1] <= vols[i].hmax) + p[1] >= vols[i].hmin && p[1] <= vols[i].hmax) { nearestIndex = i; }