You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

- SZIKRA -

Beginner

  • "- SZIKRA -" started this thread

Posts: 34

Location: Hungary, Szeged

  • Send private message

1

Wednesday, June 24th 2009, 10:14am

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*

2

Wednesday, June 24th 2009, 11:09pm

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

- SZIKRA -

Beginner

  • "- SZIKRA -" started this thread

Posts: 34

Location: Hungary, Szeged

  • Send private message

3

Wednesday, July 1st 2009, 10:17am

Thanks!
I try.... *huh*