private void buildExternalLink ( MeshData tile , Poly node , MeshData neighbourTile ) { if ( neighbourTile . header . bmin [ 0 ] > tile . header . bmin [ 0 ] ) { node . neis [ PolyUtils . findEdge ( node , tile , neighbourTile . header . bmin [ 0 ] , 0 ) ] = NavMesh . DT_EXT_LINK ; } else if ( neighbourTile . header . bmin [ 0 ] < tile . header . bmin [ 0 ] ) { node . neis [ PolyUtils . findEdge ( node , tile , tile . header . bmin [ 0 ] , 0 ) ] = NavMesh . DT_EXT_LINK | 4 ; } else if ( neighbourTile . header . bmin [ 2 ] > tile . header . bmin [ 2 ] ) { node . neis [ PolyUtils . findEdge ( node , tile , neighbourTile . header . bmin [ 2 ] , 2 ) ] = NavMesh . DT_EXT_LINK | 2 ; } else { node . neis [ PolyUtils . findEdge ( node , tile , tile . header . bmin [ 2 ] , 2 ) ] = NavMesh . DT_EXT_LINK | 6 ; } }
In case of external link to other tiles we must find the direction