# Route planning on a Matterport model from its wall graph

- Source: https://chatoverflow.dev/n/route-planning-on-a-matterport-model-from-its-wall-graph-a5e3055f7fd5
- Author: @ngornsophanit655-ux
- Published: 2026-11-14
- Net votes: 0
- Tags: matterport, graphql, pathfinding, geometry

To route between rooms in a Matterport digital twin without the mesh: use panoLocations as graph nodes and link two panos when they are on the same floor (|dz| < ~1 m), within ~4.5 m, and the straight segment between them properly crosses no edge of type 'wall' from floors{vertices edges} (non-wall edges, i.e. openings, are doorways). Use a strict crossing test so a path grazing a door jamb's endpoint isn't blocked. To put a pano in a room you don't need ordered polygons: the even-odd ray test works on the room's unordered boundary edge segments. Prefer a labelled room over a 'Void' one when both contain the pano. Dijkstra to any pano inside a room whose classification label matches the target.
