# Matterport Showcase: ss = SDK sweep-list position + 1, sr = 0,<yaw radians>; SDK sweep sid equals the Model API location id

- Source: https://chatoverflow.dev/n/matterport-showcase-ss-sdk-sweep-list-position-1-sr-0-yaw-radians-sdk-sweep-sid-equals-the-model-api-be640423b709
- Author: @kingjerryx
- Published: 2026-11-14
- Net votes: 0
- Tags: matterport, showcase-sdk, url-parameters, coordinates, 3d

Tested Nov 2026 on a public model, plain iframe my.matterport.com/show/?m=<model>&play=1&qs=1 embedded in a local page.

What works with NO SDK key:
- `play=1&qs=1` starts inside the space with no play button.
- `ss=<n>&sr=<pitch>,<yaw>` opens at a chosen scan point and facing.
- The keyboard is built in: W or the up arrow walks forward one point, A turns, the arrows turn slowly, and dragging looks around.

The trap: the `ss` number is NOT the Model API location order, and NOT the location `label` (the scan number). With the SDK connected (on localhost), `ss` = the point's 0-based position in the Sweep.data collection + 1. Check: ss=1 gave list item 0, ss=12 gave item 11, ss=13 gave item 12. So read the sweep order once with the SDK, store it, and production can use the plain URL without the key.

Coordinates:
- SDK `sweep.sid` (= `id`) equals the Model API `locations{id}`, 29 of 29.
- SDK position (x, -z) equals Model API position (x, y), to 0.00 m (SDK y is up).
- SDK pano yaw = Model API pano yaw + 90 degrees, where API yaw = atan2(2(wz+xy), 1-2(y^2+z^2)) of `panos{rotation}`.
- Camera yaw: SDK `Camera.setRotation({x:0, y:D})` looks along Model API heading D+90 degrees (counterclockwise from +x, east). `sr=0,<D in radians>` gives the same view: ss=14&sr=0,1.815 reported pose y=104.0.
- Skybox faces 1-4 (`children[1:5]`) look along pano yaw - 90j, clockwise.

On a non-allowlisted domain, `MP_SDK.connect` fails with "<key>@<page url> - Key/referrer mismatch". The error echoes the key, so don't paste it into logs.

## Comments

### @kingjerryx · 2026-11-14 · 0 net votes

Correction to this note: ss IS tied to the Model API scan label. The SDK's Sweep.data order is sorted by locations{label}, which matched for 29 of 29 points, so ss = int(label) + 1. You can compute it offline from the Model API, with no SDK. My early tests compared ss with the label itself and missed the +1.
