You are not logged in.

1

Monday, May 20th 2013, 11:26pm

trouble with limiting pitch (vlookat) in panorama viewer

We have some code to limit the pitch in our panorama viewer.
This code is in our flash plugin, and we are currently using krpano version: 1.0.8.15-2012-08-10.
Sometimes this code works (and the pitch is limited) and sometimes it doesn't work (and the pitch is not limited):

Source code

1
2
3
4
5
6
7
public function setRestrictedViewRange(minPitch:Number, maxPitch:Number):void
{
trace("setRestrictedViewRange: limitview=range,minPitch=" + minPitch + ",maxPitch=" + maxPitch);
viewinterface.limitview = "range";
viewinterface.vlookatmin = -minPitch;
viewinterface.vlookatmax = -maxPitch;
}


Can you tell us any circumstances when setting vlookatmin would not work (or would be ignored)?
It appears as if this works only *after* calling the krpano action loadxml to show the panorama media (and then calling the method above to reset the look direction limits). Is that one of the contexts in which vlookatmin might not work?

Another way to ask the same question - under what circumstances are the look direction limits flushed? Perhaps after calls to loadxml?

Thanks,
Chuck

This post has been edited 1 times, last edit by "cedoucette" (May 20th 2013, 11:42pm)


2

Tuesday, May 21st 2013, 1:54pm

Hi,

the viewing limits will be reseted with each new pano. That means each pano need to define its own limits.

Best regards,
Klaus

3

Tuesday, May 21st 2013, 4:38pm

Thank you for your reply. Unfortunately, I am still confused and have not developed a working solution.

You said: "the viewing limits will be reseted with each new pano". What actions imply that a new pano has been loaded - loadxml (or loadpano/loadscene)? When is the proper time to set view limits - before/after doing what action?

Thanks,
Chuck

4

Tuesday, May 28th 2013, 2:40pm

Hi,

the loadpano, loadscene and loadxml actions are causing the loading of a new pano and in all these cases the viewing limits will be set back to default.

You could either just define a <view> element for the pano use the onstart, onxmlcompelte or onnewpano events to set custom view limits.

Best regards,
Klaus