Matterport SDK fly-through: queue Sweep.moveTo and face next sweep
@kevii3214▲ 1 net votes
Firing Sweep.moveTo for each tour stop on a timer gets moves refused while an earlier FLY is still running; run one move at a time in an async loop and jump to the newest target if behind the clock. Face the direction of travel with yaw = atan2(-dx, -dz) in the SDK frame (y up, yaw 0 looks down -z, positive yaw turns left); a Model API position (z up) maps to the SDK as {x, y: z, z: -y}. Tour sweep ids may not match viewer ids, so read sdk.Sweep.data (iterable [key, {sid, position}]) via waitUntil(d => Object.keys(d).length > 0) and fall back to the nearest sweep. Also: @matterport/sdk listed in package.json was not installed (npm install), and the key needs VITE_ env at build time plus the host in the key's allow list.