Sie sind nicht angemeldet.

1

Dienstag, 27. Mai 2014, 23:39

spheretoscreen for hotspots outside the viewport

Hi!

I'm trying to overlay hotspots with html elements and make them stick to edges of the screen when they are outside of the viewport.

For hotspots outside of the viewport I'm not getting values returned by using spheretoscreen. Is this is anyway possible? Maybe with a workaround.

Im using the following little snippet;

Quellcode

1
	<events onviewchanged="		spheretoscreen(hotspot[camera-crowd1].ath, hotspot[camera-crowd1].atv, hotspotcenterx, hotspotcentery);"/>

2

Mittwoch, 28. Mai 2014, 14:28

Hi,

that's totally impossible!

That limitation is not from krpano, that's basic math and 3d/2d space .

Best regards,
Klaus

3

Mittwoch, 28. Mai 2014, 15:16

Darn it!

Not quick work around? Cause I tried a quick lookto/moveto moving around to try to pick up coords, but that didn't do it.

(btw. awesome plugin!)

4

Mittwoch, 28. Mai 2014, 15:40

Not quick work around?
No, not workarounds, that's a fundamental limitation!

I don't know how to explain it understandable with words, but I have tried explaining the basics here with a simple illustration - look at the different colors:

5

Freitag, 20. Juni 2014, 12:21

Hello there,

I am trying to do something similar to this, although I do understand the mathematical limitations, so I only need to know when hotspots are outside of the FOV but still in the projection plane, hence "close" to being displayed.

Although I think there's another problem... I am doing what the original poster was:

spheretoscreen(get(hotspot[trackinghtsp_1].ath), get(hotspot[trackinghtsp_1].atv), hotspotPosX, hotspotPosY);

and the values for hotspotPosX and hotspotPosY always refer to the same spot on the FOV: the center of the video. I move the camera around, and the values accomodate to show that point, not the hostpots ath and atv...

I am tracing as well the hostpots values before using spheretoscreen and they do change without moving the camera, so they are correct...

I'm just starting to learn the ropes, so hopefully I didn't just get the syntax wrong!

Am I doing something wrong? Any ideas?

6

Montag, 23. Juni 2014, 12:24

Ah, got it, it was a matter of sending variables without the "get" method... so this worked:

spheretoscreen(hotspot[trackinghtsp_1].ath, hotspot[trackinghtsp_1].atv, hotspotPosX, hotspotPosY);

*whistling*

Beiträge: 130

Wohnort: Venezia

Beruf: interactive pictures

  • Nachricht senden

7

Mittwoch, 8. Oktober 2014, 15:27

THANKS!!! the get or not to get.. the problem is always there!!!