Distorted hotspots behave strangely while dragging

  • Dear Klaus and other Krpano specs,

    I’ve encountered another interesting challenge while playing with distorted
    hotspots. I’ve been trying to make a sort of interactive pano where one could
    take, say, a cell phone from the table, move it around, then “hide” it in
    someone’s pocket. But I’ve noticed that distorted hotspots located on down or
    up cubefaces behave somewhat strange while running “draghotspot” action.

    I guess this is due to margins distorted hotspots have, because distorted hotspots
    located in horizontal cubes behave quite normal. Is there any way to tweak the
    “draghotspot” action to eliminate such hotspot behavior?

    Maybe, someone have a guess how to do that?

    The example pano is below (flash only), inside it click the red and white cell phone lying
    on the table near a fish tin can and drag it to see the way it rotates far off
    where the mouse handcursor is.

    https://dl.dropbox.com/u/50930222/krp…on/question.swf


    Thank you a
    lot for any possible ideas to fix this!

    Regards,

    Alexey

    Regards,

    Alexey

  • nice idea *wink*

    maybe set the origin of the phone to mouse/cursor?

    Code
    origin="cursor"

    *question*

    So..
    Onclick the phone .. Set phone origin to cursor

    Tuur *thumbsup*

  • Thank you, Tuur, for you prompt help,

    I've just tried setting the hotspot's origin to cursor both via onclick="set(hotspot[..].origin,cursor);" then by just setting it in the hotspot attributes via origin="cursor". But neither works, I think it's because hotspots can't have origin, only textstyles and progress bars can have that, or maybe I'm doing something wrong.

    The hotspot's code is as follows:



    I suspect the reason for such jumpy behavior is the ox and oy margin needed for perfect hotspot alignment onto cubeface. But I'm quite puzzled about adjusting the draghotspot (); action as to ignore this margin while moving...

    Regards,

    Alexey

  • Hi,

    first - there is no origin="cursor" setting for hotspots

    About the dragging - the draghotspot action is just moving the ath/atv point, so correct - the additional ox/oy position adjustments are the reason for the 'strange dragging behavior' .

    Maybe see this tutorial:
    Example/Tutorial - Extract a Distorted Hotspot from any kind of Pano Image (with perfect pixel alignment)

    By creating the hotspot this way, the hotspot will be centered at the ath/atv position without any ox/oy shifting.

    Best regards,
    Klaus

Participate now!

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