Change vlookat/hlookat on run

  • Hi,

    I want to make a call in Flash to change the current panorama. And instead of having the initial vlookat/hlookat pulled from the xml, I want to keep it variable in actionscript. This is what I have:

    Code
    var fov:Number = 45;
    		var pan:Number = 90;
    		var tilt:Number = 10;
    		krpano.call("loadpano(location_1.xml, view.hlookat=" + pan + "&view.vlookat=" + tilt + "&view.fov=" + fov + ",MERGE,BLEND(1));"); //Make the call, executing the new pano

    In the xml I deleted the whole <view></view> part. This means that It should get the view information from the previous panorama unless its overwritten (Because I use merge). And because I overwrite it (2nd parameter of loadpano) It should take the fov,pan,tilt I declare here.

    But it doesnt. I even tried setting the 2nd parameter to null, and parse a lookat(pan,tilt,fov) to krpano. No success.
    Flash traces the call correctly. How do I force the tilt/pan/fov I want?

  • vlookat
    vertical look position in spherical coordinates (-90 .. +90°), default="0
    this is the setting that controls looking up or down.

    you should make a new post for this kind of thing this is not the correct forum for this type of question.

    Hello
    I'm trying to constrain the 'tilt' of a pano so that the viewer cannot see the nadir or the zenith. i've tried many variations of the 'lookat' parameters with no success.
    Any advice?

    bw

    JL

  • 1
    apologies trainee VN2009 I must improve my telepathic powers!
    2
    your advice certainly points the camera in the desired direction but doesn't constrain the viewer from exceeding the vlookat setting which was the original question.

    bw

    JL

  • my bad you are right this is what i was trying to refere to.

    •vlookatmin
    vertical minimum look position in spherical coordinates (-90° .. +90°), default="-90"

    •vlookatmax
    vertical maximum look position in spherical coordinates (-90° .. +90°), default="+90

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!