Hotspot is viewable or not

  • Hello Everybody!
    Is there any way to determine if a hotspot is viewable to the user on the screen? I mean I would like to know if a hotspot is in the viewable area or it is in the hided part of the panorama, which is not seen by the user at this moment.

    For example is there a function which can calculate this?

    Even better if there would be an event of the hotspot which will be triggered when the hotspot leave the viewable area, and another event which will be triggered when the hotspot come into the viewable area... *rolleyes*

    Thank the answers.... *rolleyes*

  • Hi,

    there is no automatic way yet,
    but it would be possible with a own plugin,

    this plugin could calculate the distance between the current "view.hlookat" / "view.vlookat" and the "hotspot[name].ath" / "hotspot[name].atv" values,

    if the distance between "hlookat" and "ath" is below "view.hfov" and the distance between "vlookat" and "atv" is below "view.fov" then the center of the hotspot would be visible,

    but note - the distance calculation must respect the 0-360 / 360-0 wrap around!

    once more:
    a other "tricky" way could be to check for "hotspot[*].sprite.visible",
    it should work, but I never have tested that yet

    best regards,
    Klaus

Participate now!

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