You are not logged in.

1

Tuesday, May 27th 2014, 11:39pm

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;

Source code

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

2

Wednesday, May 28th 2014, 2:28pm

Hi,

that's totally impossible!

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

Best regards,
Klaus

3

Wednesday, May 28th 2014, 3:16pm

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

Wednesday, May 28th 2014, 3:40pm

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

Friday, June 20th 2014, 12:21pm

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

Monday, June 23rd 2014, 12:24pm

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*

Posts: 130

Location: Venezia

Occupation: interactive pictures

  • Send private message

7

Wednesday, October 8th 2014, 3:27pm

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