public static PathConvexShape findGroundShape(Point3f guyPosition, PathLevel pathLevel) {
        List<PathConvexShape> pathConvexShapeList = pathLevel.getPossibleShapes(guyPosition.x, guyPosition.z);
        if (pathConvexShapeList == null) {
            return null;
        }

        double highestPossibleY = guyPosition.y;
        PathConvexShape closestShape = null;
        double smallestYDiff = Double.MAX_VALUE;

        for (PathConvexShape curPathConvexShape : pathConvexShapeList) {
            if (curPathConvexShape.xzPath.contains(guyPosition.x, guyPosition.z)) {
                Point2f guyPoint2f = new Point2f(guyPosition.x, guyPosition.z);
                int planeVertexIndex = curPathConvexShape.vertexIndexPointer.get(0);
                PathVertex planeVertex = curPathConvexShape.parentMesh.pathVertexList.get(planeVertexIndex);

                double yValue = MathUtils.calculatePlaneY(guyPoint2f, planeVertex, curPathConvexShape.planeGradient);
                double yDiff = highestPossibleY - yValue;
                if (yDiff >= 0 && yDiff < smallestYDiff) {
                    smallestYDiff = yDiff;
                    closestShape = curPathConvexShape;
                }
            }
        }

        return closestShape;
    }