pathRecordDistance is in distance squared.