Topic: Matching StreetView heading / pan values

Hi,

I'm trying to match the heading value of a 2D google streetview preview to pano pan values. I select a location on a map and then fetch the 2D preview using (as per a google sample):

https://maps.googleapis.com/maps/api/streetview?size=400x400&location=47.5763831,-122.4211769&fov=80&heading=90&pitch=0&key=MYKEY

Headings using this API match expected orientations of the resulting 2D preview images. I then fetch the pano at that location with the pano plugin. I expected the pano to load looking "north" by default.

Since my 2D map is not rotated I know this preview is looking east and I can verify this in the 2D preview image with heading of 90. If I take that heading value and set the streetView.pano.pan from the same location, it's not oriented the same at all. Also, the "north pan" value is unclear to me. It seems to represent some declination or camera angle?  I'm using very few features, no keyboard/mouse/rotation controls. Just setting a pano from the downloader and pushing in the pan value I would like. I am assumed the 0/0 north pan/pan is looking "north" along +x on the pano sphere? But this does not always work as I expect. (for example, north pan loaded as 246.34, but "north" is a relative pan of -127)

I'd appreciate any help trying to match heading to the pano pan value(s) !

Cheers,
Stephen

Re: Matching StreetView heading / pan values

Hello.

Just set pan equal to heading in your url. In this case: 90.

About north pan:
Pan = 0 should point north. But in real images this is not always the case, because the person who made the panorama can look in any direction, not necessarily north.
North pan is the value of pan which is north oriented.
For Street View, this value is taken from the meta data and does not need to be entered manually.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Matching StreetView heading / pan values

Hi Alex, thanks for the reply. This did not work consistently if I select the RotationMode to "Rotate GameObject" where the object to rotate is the Panorama instance in the scene. It does work correctly if I set RotationMode to RotatePanorama instead. I don't use the camera modes since I have a pre-existing VR camera rig.

Cheers,
Stephen

Re: Matching StreetView heading / pan values

You cannot use Rotate GameObject mode to rotate a panorama instance.
It simply won't work correctly due to the rotation algorithms and you will see oddities any time you try to rotate the panorama. Even without VR.
Just use Rotate Panorama mode instead.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.