Centering hotspot on click?

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
ricepixels
Posts: 20
Joined: Fri May 29, 2009 12:52 am

Does anyone know how to set Actions/Modifier to center the hotspot in the window on Mouse Click? I've played with Move To View settings but was looking for an easier way than trying to figure out the Pan/Tilt/FoV for each hotspot. BTW, Thanks zap for your skin. It was very helpful.
joescarb
Posts: 13
Joined: Mon Jan 26, 2009 12:16 am
Location: Northwest North Carolina, USA

I would also like to know the answer to this question. Could someone please comment?

--Joe Scarborough
Mac OS 10.5.8, Pano2VR 2.3.3
frodo
Posts: 224
Joined: Wed Oct 15, 2008 2:52 pm

Hi!
What do you mean by "centering hotspot"?

Regards, Martin
joescarb
Posts: 13
Joined: Mon Jan 26, 2009 12:16 am
Location: Northwest North Carolina, USA

Greetings,

I can only speak for myself, but here's the action desired.

When a person clicks on the hotspot the pano pans and tilts to center that hotspot in the viewer window.

Now. It seems to me that when hotspots, let's say point hotspots, are created in the hotspot editor, x/y coordinates are assigned to that point. On mouseclick, mouseenter, mouseleave, etc., those x/y coordinates are being passed to the skin. Else, how would the correct content be displayed? If that is the case, and I can't imagine that it is not, assigning the correct action would pan/tilt the pano, as described above, in a fashion similar to Move to Default View.

Use the following example if that is unclear. On the embankment is a large rock. That is where the hotspot is located. Click on that to see the normal actions. Now, move the rock so it is over on the left side of the view window and try again. This time the pano will move to the Default View along with the displayed content. Instead, I want that hotspot and its attending text box image to pan/tilt to the center of the view window. Since the skin has only one hotspot template defined, but the ultimate project may have many hotspots in the Hotspot Editor, the x/y coordinates of each hotspot would have to be passed onto the skin in much the same way that URLs are passed to the text box in order to show the correct image. Placeholder???

http://bit.ly/cLWXGy

--Joe Scarborough
Mac OS 10.5.8, Pano2VR 2.3.3
User avatar
Hopki
Gnome
Posts: 13088
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Why no add two text boxes to the skin with the placeholders $ap and $at
The current pan and tilt will be displayed, so then you can enter the data in the move to action in the hotspot.
When you have finished making the tour, just delete the two text boxes.

Regards
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
joescarb
Posts: 13
Joined: Mon Jan 26, 2009 12:16 am
Location: Northwest North Carolina, USA

Hopki,

That is a good avenue for further experimentation, and I WILL pursue that.

However, with 75 hotspots in the initial experimental tour over four different panos, all sharing the same skin, that would, on the surface seem to be rather time consuming. Additionally, with hundreds of tours involving thousands of images and their hotspots, you can imagine that, again, on first thought, this process would be cumbersome to say the least.

But let's suppose that is the approach taken. Where in the hotspot would this information be stored to pass it on to the hotspot template in the skin. Remember, one hotspot template serving all hotspots in the tour that service the multiple text box images. Certainly, there will be other hotspot templates for navigational purposes, but only one that delivers the image content.

--Joe Scarborough
Mac OS 10.5.8, Pano2VR 2.3.3
joescarb
Posts: 13
Joined: Mon Jan 26, 2009 12:16 am
Location: Northwest North Carolina, USA

Here,

I can answer that question!!!

Here's a dirty process I found to determine the Pan/Tilt/FoV values I wanted to use in order to rotate (pan/tilt) the pano to center a hotspot on the viewer window. The process was derived partly from the suggestion by Hopki, q.v. above.

I used one temporary text box with the values $ap/$at/70 since my FoV is desired to be fixed at 70 for this project, but I needed to find the pan/tilt values for centering the hotspot. Works like a charm. Those determined values can be placed in the Target Field and then called in the hotspot template in the skin editor by placing $ht in the Pan/Tilt/FoV container of the Move to View Action script. Let me add that I rotate the pano, visually centering the hotspot as I would like it to be, and the box now contains the Pan/Tilt/FoV values. It's pretty interesting to watch.

It's a little more work than I had hoped for, but it does work. What I had actually hoped for was to be able to make a call to, or have the hotspot send, dynamically, the arguments for the hotspot's location.

I'll post some window captures tomorrow for clarification, and a Test Bed example.

--Joe Scarborough
Mac OS 10.5.8, Pano2VR 2.3.3
User avatar
Hopki
Gnome
Posts: 13088
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Why not have one picture frame and load different images to it using the point hotspot editor?

The picture frame/text box can then be fixed to the centre of the screen.
See Here

I made this a very long time a go; it also uses my screen tint as well as a couple of other goodies such as image zoom.
You can also add image pre load JS in the html page to stop having to wait for the images to load.

Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
joescarb
Posts: 13
Joined: Mon Jan 26, 2009 12:16 am
Location: Northwest North Carolina, USA

That is exactly what I did as seen HERE .

In this example some of the hotspots are, can be, may be, on the outer edges of the viewer window. So the idea is to bring the hotspot, in this case a grave marker, to the center of the window. This has the potential to become an aggravation, but certainly might have its uses.

Here's a test bed that does what is described above. The text box with numbers in it is to capture the P/T/FoV numbers and the hotspot is the rock just below that. Keep in mind that the pano and the images presented are not relevant to one another; just for testing.

--Joe Scarborough
Mac OS 10.5.8, Pano2VR 2.3.3
Post Reply