• Can anyone tell me if ' limitview="range" hlookatmin="-80" hlookatmax="+90" ' should work on ipad?

    I have the latest bugfixes and am able to restrict the view vertically but not horizontally.... I believe the code to be correct as it works fine on the desktop...
    <view hlookat="0" vlookat="-20" fovtype="MFOV" fov="90" fovmin="75" fovmax="120"
    limitview="range" vlookatmin="-90" vlookatmax="+60" hlookatmin="-80" hlookatmax="+90"/>

    Can anyone help? I have foolishly (or not?) told the client that this horizontal restriction is possible as I have used vertical restrictions before and, logically, it never entered my head that horizontal would be any different.
    My deadline is tomorrow!

    If this line of code is not supported, does anyone have a work around?

    As always, any comments are appreciated..... except those focusing on the 'foolishly' part of this thread! *cursing*

    Kev

  • this one works keeping viewing inside 0-90. could be changed to any number just make sure your starting view settings are in between your wanted restrictions.

    <action name="stop">
    IF(view.hlookat LT 0, set(view.hlookat, 0));
    IF(view.hlookat GT 90, set(view.hlookat, 90));
    </action>

  • this one works keeping viewing inside 0-90. could be changed to any number just make sure your starting view settings are in between your wanted restrictions.

    <action name="stop">
    IF(view.hlookat LT 0, set(view.hlookat, 0));
    IF(view.hlookat GT 90, set(view.hlookat, 90));
    </action>

    Tried it but it does not work on iPad at all.
    I get some wrong restriction in Flash though.

    Hans

  • I actually left the other limits in place although they were set differently than my test. I simply copied the stop code from vn

    <action name="stop">
    IF(view.hlookat LT 0, set(view.hlookat, 0));
    IF(view.hlookat GT 90, set(view.hlookat, 90));
    </action>


    and then found my events tag and added the

    onviewchange="stop();" to that events tag.

  • I seen it and it seems to work in a way.

    But you put the events within scene 1 and it affects all scenes but in different ways depending on your initial view.

    Have to try it again as this is exactly one of the ways I did it, except for the event was not within the scene tags.

    Hans

  • if you put it inside scene 1 it should only affect other scenes if you are using MERGE or KEEPVIEW or KEEPBASE. I tested it outside the scene tags however it was just a single pano so I could not speak for what Hans found.

  • Didn't even think about it affecting EVERY scene. I will get back to the drawing board and limit it to each scene in my test.

    Still, this was a great idea, VN2011.

  • To any of you who are interested, regarding the 'affecting all scenes' issue. Here's a work around:

    I put <events onviewchange="stop();"/> within the scene of the restricted tour then created another action

    <action name="cancelstop">
    IF(view.hlookat LT -360, set(view.hlookat, -360));
    IF(view.hlookat GT 360, set(view.hlookat, 360));
    </action>

    and within the next scene added <events onviewchange="cancelstop();"/>

    This work for me on the desktop and ipad with no problems.

    Thanks again VN... quick response has saved my a*s. *thumbsup*

    Kev

  • glad this worked. ive been saved a few times in these forums dealing with last minute tweaks. kev just so you know another way to cancel the limits would be to just set the event onviewchange to empty quotes <events onviewchange=""/> then there would be no need to duplicate the action with he 360 rotation set. the empty event would overwrite the limits. basically doing the same thing with less code.

  • I posted this just a few days ago, which does the exact same thing in just one line.:
    <events onviewchange="set(view.hlookat,0)"/>
    Still good to see that others are trying to find a workaround too *thumbup*

    But like I said in the other thread, this solution is far too slow and laggy for iDevices. The view-tag gets set new for every moved pixel, what means: 100 pixels movement per sec = 100 times reading and writing the view-tag. Your code, VN2011, is even a little slower, because of the fact that the action also needs to be calculated 100 times/s.

    I tried to use the mouse.x/mouse.y-tags instead, but it´s just as slow. And searching the forum I found out that it´s possible to lock the mousewheel, but I found no way to lock the mouse.x-movement inside XML and JS is no solution for me :(

    Keep brainstorming, guys! There has to be a solution *smile*
    Best regards,
    Nupsi

  • another way to cancel the limits would be to just set the event onviewchange to empty quotes <events onviewchange=""/>

    glad this worked. ive been saved a few times in these forums dealing with last minute tweaks. kev just so you know another way to cancel the limits would be to just set the event onviewchange to empty quotes <events onviewchange=""/> then there would be no need to duplicate the action with he 360 rotation set. the empty event would overwrite the limits. basically doing the same thing with less code.

    I will definitely give both of these suggestions a try... as soon as I've rectified my sleep deficit which is the result of this latest project! *sleeping* Although I'm a bit dubious about empty events for the idevices as, in the past, I've discovered the this can cause issues.

    Kev

Participate now!

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