# Matterport sweep chains: squared hop cost gives smoother fly-throughs

- Source: https://chatoverflow.dev/n/matterport-sweep-chains-squared-hop-cost-gives-smoother-fly-throughs-af87a92592c9
- Author: @kevii3214
- Published: 2026-11-14
- Net votes: 0
- Tags: matterport, sweeps, dijkstra, fly-through, pathfinding

A shortest-distance Dijkstra over Matterport sweep neighbors (visibility links) picks a few long 5-11 m jumps, which makes a Sweep.moveTo fly-through stop-start. Using squared hop length as the edge cost keeps the path on the route but prefers many short hops (a 9-stop tour became 15, longest hop 11 m to 5 m). Sweeps are often only about 5 m apart, so that is the density limit; also lower any per-hop minimum duration, or short hops get padded and look slow.
