Goto Previous Panorama with Previous Pan/Tilt/FoV

Q&A about the latest versions
Post Reply
kinema
Posts: 6
Joined: Fri Dec 28, 2018 10:13 pm

Hi

We created a tour trough a vehicle where we the user can click on cover plates to see whats behind (as instruction for technicians).
These behind the cover detail pictures are not added as ImagePopups but instead additional "flat" panoramic pictures so the user can zoom in to a high level of detail which is needed.

But in order to go back to the panorama, I would like to add a closing "X" button so that if they leave the photo back to the panorama,
the previous Pan/Tilt/FoV is had before. In the skin editor, I added an Button:

Event: Mouseclick
Action: Open Panorama
URL: {$(back)}
Pan/Tilt/FoV: $(bwd)

By chanching the "North" value of the detail picture, I am able to get the the correct panning.
Is there a way to get also the Tilt?

Of course, one possibilty would be to add another hotspot in the detail picture with target Pan/Tilt/FoV values. But this is not very user friendly since I would like to have a static closing "X" always on the top right corner.

Or does anyone have another solution for this?

Thanks a lot.
Norbert
User avatar
Hopki
Gnome
Posts: 13015
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Norbert,
You can use a text variable to store the value for the Pan/Tilt and FoV
So the close button can then have the back action using the pan tilt FoV stored in the variable.
Please see attached project.

The Project
The project has five nodes, the first three are 360 panoramas and the last two are flat image nodes.
All nodes have user data titles set and the two flat image nodes have the tag: popup.

The three 360 nodes have hotspots that link them together.
In node one and three you will see hotspots that go to the flat image nodes, these are found on the word North in the panos.

The Skin
I used modified components so the ht_node component and the ht_image component, I just deleted the elements I did not need.

The hotspots that link to the 360 nodes are using the hotspot template ht_image.
The hotspot template that opens the flat image nodes use ht_popup.
This is so I can use different graphics and actions for the point hotspot that will go to the flat image nodes.
The skin has the variable: popup_angle, type Text. The others are from the components but are not important for this project.

How it works
The hotspot temple ht_popup has two actions:
• Mouse Click, Open Next Panorama, Hotspot URL, Default View
• Mouse Down, Set Variable Value, popup_angle, Set(=), $(ap)/$(at)/$(af)

The placeholder $(ap) reads the pan angle of the panorama (angle pan).
$(at) reads the tilt and $(af) reads the FoV.
So on mouse down the current pan, tilt and FoV is stored in the variable.

The Close Button, visible is deselected and has the visible logic block: Tags contain popup, Visible: true
So as the flat image nodes have the tag: popup, the button will show only in these nodes.

The close button has the action: mouse click, open next pano, {$(back)}, $(*popup_angle)
Note: you can select URL: Last Visited Node, but then you will need to select Expert Mode and enter: $(*popup_angle)
This is the placeholder that reads the variable value.

So when clicked you will go back to the node you came from and use the pan, tilt and FoV that was stored in the variable.

Useful links:
List of placeholders
placeholders in the skin

Regards,
Hopki
Attachments
popup.zip
(49.27 KiB) Downloaded 191 times
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/
kinema
Posts: 6
Joined: Fri Dec 28, 2018 10:13 pm

Hi Hopki

Finally, after a long break, I just tested your solution and it works perfect! Thanks a lot.

Best regards,
Norbert
NFSTC
Posts: 20
Joined: Fri Feb 04, 2011 8:38 pm

This is exactly what I was looking for. I'm able to implement it, but for some reason only the tilt variable is working when I return to the original pano. I've confirmed that the correct text is being saved in the variable (ie 136.5/-18.8/31.1). When I navigate back to the pano only the -18.8 is used for the new view, the pan and FoV are set back to the default view parameters. Is there a way to lock these parameters (pan and FoV) that may have been set somehow? If I manually type in the coordinates instead of using expert mode and using a variable then it works as expected. Any help is greatly appreciated, thank you!
User avatar
Hopki
Gnome
Posts: 13015
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Can you post your skin?
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/
NFSTC
Posts: 20
Joined: Fri Feb 04, 2011 8:38 pm

My skin is attached (that sounds weird :lol: ). Thank you for your help!
custom.ggsk
(49.75 KiB) Downloaded 113 times
User avatar
Hopki
Gnome
Posts: 13015
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hummm,
The point hotspot does its job by setting the pan, tilt and FoV to the variable "return_pos".
But your placeholder is wrong.
In the previous button use this action:

100.png
100.png (38.36 KiB) Viewed 1689 times

So now it will select the previous panorama, but to use the variable in the target select Expert mode and add the variable placeholder:

200.png
200.png (36.58 KiB) Viewed 1689 times

This will now work.
Regards,
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/
NFSTC
Posts: 20
Joined: Fri Feb 04, 2011 8:38 pm

Hi Hopki!

Okay, I'll gave this a try but it's still doing the same thing. I'm attempting to load a specific node from the user data source field so previous node won't work long term. The {node1} variable was a test to simplify things I'm actually using $(us) which works great.

FYI - when I put in the {$(prev)} code it goes to the completely wrong node (as expected) but still doesn't navigate to the correct Pan/Tilt/FoV location in that node. It's very strange. Let me see if I can explain in full detail. I have placed the variables in a text box so I can see what is happening.

Node1 loads, here are the variables:
Current position = $(ap)/$(at)/$(af) = 158.0/-36.0/31.1
return_pos = empty (as expected, nothing has been loaded to it yet)

Move pano so new coordinates are 144.6/-26.7/21.2 (hotspot still in view)
Click on hotspot, user is taken to node5
Current position = $(ap)/($(at)/$(af) = 0/0/0 (just a still image)
return_pos = 144.6/-26.7/21.2 (variable saved correctly)

Click on exit button, user is returned to node1 (as expected) but coordinates do not load correctly. Here's where they are taken and what the return_pos variable is set to.
Current position = $(ap)/($(at)/$(af) = 158.0/-26.7/31.1
return_pos = 144.6/-26.7/21.3

So, as you can see, the return_pos variable is saved correctly and doesn't change but when returned back to any node (even previous) the pan and FoV coordinates return to their default view setting even though tilt is updated to what was saved in the return_pos variable. Is it possible there's something in the node1 pano that's preventing the Pan and FoV to be set for some reason? We have very little programming like this so I don't think that's the case but is the only thing I can think of.

Thank you for your help on this! It is very much appreciated!
NFSTC
Posts: 20
Joined: Fri Feb 04, 2011 8:38 pm

As a test I just created a brand new project file with nothing but two nodes and the same thing is happening so I don't think it's any other logic than what the skin editor has in place.
User avatar
Hopki
Gnome
Posts: 13015
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
Applied the settings to your skin and created a quick project, it is working with the previous button.
Regards,
Attachments
project.zip
(70.89 KiB) Downloaded 84 times
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/
NFSTC
Posts: 20
Joined: Fri Feb 04, 2011 8:38 pm

Thank you so much. I see that I had curly brackets around my variable rather than just the variable. Now it is working...odd that it worked with just the tilt, which I think was throwing me off.

For anyone else running into this here's what I had in the Pan/Tilt/FoV field which did NOT work.
{$(*variable_name)}

and it should be this which DOES work.

$(*variable_name)

Thank you Hopki for your help! You're amazing.
Post Reply