I suspect Google Street View is a bigger influence here than Matterport, not that it matters. Interesting idea, though.
If all you want is for the up and down keys to load the next and previous pano, you can edit the
skin_keydown_event section in vtourskin.xml adding:
|
Quellcode
|
1
|
if(keycode == 38, skin_nextscene_loop(+1) );
|
But that won't give you the same behavior as Matterport or Street View where the up arrow takes you to the scene who's navigation arrow is closest to your center of view. That is especially obvious when you have three or more navigation hotspots in a scene.
To accomplish Street View navigation the up arrow would need to call an action that finds the navigation hotspot with an
ath that most closely matches your current view
hlookat. I would then call the click event for that hotspot.
Some caveats: You want to programmatically exclude any hotspots that aren't for navigation in the comparison. You also need to do some math to account for the 360 fov. For instance, if your current hlookat is 179 and there is a navigation hotspot with an ath of -179, those are are only 2 degrees apart, not 358. I believe you use the mod math function to make an accurate comparison.
It would be the opposite with the down arrow where you want the navigation hotspot farthest away from you current hlookat.
Hope that helps.
Scott