(Completely untested) code for finding a route along a mesh, through a plane