Beiträge von gerpho

    I've found the answer ; its so simple I feel stupid about it *cry* :

    Of course, the "donecall" of the nonblocking lookto is called when the action is .... done !

    So that the answer is

    Code
    lookto(x,y,field,smooth(100,100,100),true,true,nextaction());


    and this works perfectly : nextaction() is run only when lookto is finished, and view.hlookat is updated since lookto is now nonblocking.

    Now I whish there was a nonblocking looktohotspot ; well I'll have to rewrite the code anyway, so...

    Thanks for your stimulating help, Zephyr

    Philippe

    I think I'm slowly going somewhere :

    Code
    lookto(x,y,field,smooth(100,100,100))

    is blocking so that view.hlookat is not updated until lookto is done

    Code
    lookto(x,y,field,smooth(100,100,100),true,true);
    nextaction();

    is nonblocking : view.hlookat is updated while lookto is running.

    However, in this case, since it is nonblocking, nextaction() is executed while the lookto is running, so that it's a mess. I've tried :

    Code
    lookto(x,y,field,smooth(100,100,100),true,true,WAIT)

    to wait for the end of the lookto action but it doesn't work.

    right now the only solution I have is :

    Code
    lookto(x,y,field,smooth(100,100,100),true,true); 
    delayedcall(2.0,nextaction());


    but that's really not satisfying, because I don't know what the delay must be : it depends on how long the lookto action could last, and that is unknown.

    What I nead is some way to wait until the lookto action is ended.

    Right now I've no idea how to do this *confused*

    oops, in my initial post I mentionned "moveto" and "movetohotspot" actions. Its a misprint *sad* , I meant "lookto" and "looktohotspot" instead ; and the only one of these with a non blocking parameter is "lookto".

    But anyway, the problem is still there, and I have no explanation yet...

    Hi,

    I've implemented a compas on my VT ; the code is inspired from the "compass" included in the KRPano examples.

    I use the "onviewchange" event to update the compass heading,

    It works fine in most cases, except during "moveto" and "movetohotspot" actions ;

    I've tried setting "nonblocking" to true in the moveto actions, but it didn't change anything...

    Any suggestions ?

    Thanks for your help

    Philippe

    Hi

    I yant to create several large hotspots, on which text is displayed when mouse hovers, but with no "onclick" action.(e.g. just to display the name of that particular place)

    The problem is that on such a hotspot, even if I don't code the onclick/ondown action for this hotspot, the mouse click control is "trapped" by the hotspot and it can't be used anymore to navigate in the pano. If there are a few of these, and they are contiguous, then mouse navigation is blocked altogether, because the cursor is always hovering over a hotspot.

    Therefore, what I'm looking for is a way to create a hotspot with enabled "onover", but disabled "onclick" and "ondown", so that when I "click", mouse control is forwarded to the underlying action which controls the displacement within the pano.

    I hope what I mean is clear enough.

    Any suggestions ?

    Philippe

    Yes, I did ; actually the code I typed in my last post is wrong : I swaped false and true :
    the actual code is this, with the full line of code :

    <hotspot name="spot0" handcursor="false" url="panodata/graphics/spots/spot0.png" visible="false" onhover="set(hotspot[spot0].visible,true);" distorted="true" ath="-0.0799518" atv="-0.14331" width="1" height="2" rx="-0.00293835" ry="-179.994" rz="-89.5656"/>
    which doesn't work (nothing is ever displayed)

    if I change the code to this (I remove the first "visible" statement)
    <hotspot name="spot0" handcursor="false" url="panodata/graphics/spots/spot0.png" onhover="set(hotspot[spot0].visible,true);" distorted="true" ath="-0.0799518" atv="-0.14331" width="1" height="2" rx="-0.00293835" ry="-179.994" rz="-89.5656"/>
    it is permanently displayed

    and if I change to this
    <hotspot name="spot0" handcursor="false" url="panodata/graphics/spots/spot0.png" onhover="set(hotspot[spot0].visible,false);" distorted="true" ath="-0.0799518" atv="-0.14331" width="1" height="2" rx="-0.00293835" ry="-179.994" rz="-89.5656"/>
    then the image is displayed until the mouse hovers over. (and never comes back again). It seems that the "visible" variable is defaulted to "true"

    Is there something about onover and onhover that makes things different ? I didn't quite undestand this in the forums, the fact that onhover is executed over and over again until the mouse is no more on the hotspot ?

    (I'm sorry about my vocabulary, last time I wrote some code, it was in "pascal" and that was a long time ago *whistling* . many terms have changed since then.)

    Hi
    I'm a complete beginner, as I rely on panotour to do the programming.
    However, I would like to do something that panotour does not provide :

    I make aerial panos of towns, and I want to display future buildings at their exact position.
    To do this, I want the image of a hotspot to show only when one hovers over the hotspot : the image would represent the future, overwriting existing picture.

    I found somewhere that this could be done on a plugin, using the code :
    <plugin name="spot1" visible="true" handcursor="false" url="image.png" onhover="set(plugin[spot1].visible, false);" ... and so on />

    Apparently it doesn't work with a hotspot (i.e. replacing the word "plugin" in the above code with "hotspot")

    Any idea if what I want to do is possible and/or if I did something wrong ?

    Thanks in advance