How to change size/position of element that is a child of point hotspot

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
markleaf
Posts: 8
Joined: Fri Nov 02, 2018 8:41 pm

Hi,

I need to display some information stored on hotspot node, such as $hd, using a text skin. To do that, I make the text skin a child of the point hotspot in skin editor. However, that makes the text skin's position/size both be anchored to the parent, which is the sizeless point spot. What could I do if I want to anchor the text (both position and size) to the window? Making the text skin not a child of hotspot would not work cause that will lose possibility to retrieve information stored in hotspot node. Yes I could try to store those information on pano node instead, but it would be tough when you have multiple hotspots on a single pano node.

Any ideas?
markleaf
Posts: 8
Joined: Fri Nov 02, 2018 8:41 pm

Please, any one?

The goal is to show a simplified web like popup screen with both texts and images or even hyperlinks to have more detailed intro for current hotspot. As there might be multiple hotspots in one single pano node, the best method I could think of is to host needed information within each hotspot, like the "description" field, which even accepts simple html codes (fantastic by the way). I tried the built-in information popup skin, and realized that was actually an isolated popup thus could not retrieve correct information from current hotspot, as it is not the child of any hotspot. The thing is, however, if you make a screen (rectangle, text or anything) element a child of a hotspot, you lose control to the size and position of it, as it'll be anchored to the parent (point hotspot in my case), which has no size at all and always sticks to the picked hotspot (which is correct as expected).

From my perspective, a popup intro like this should not be something rare, am I looking at the right direction to play with? Or, there are actually better way to achieve that?

Any suggestions?
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
If you look at the video info component you will see it uses information from a point hotspot but displays in a text bos not associated with the hotspot template.
This is because it is using a set value action.
When the mouse is over the hotspot you can then read the data stored in the hotspot title and description text boxes, but as soon as you move the mouse you brake the connection. So what you do is have a set value action so when you are over the hotspot you can “set” its data to a text box in the skin.
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/
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi,

If you take a look at my tutorial 'Hotspot Templates and iFrames' it may give you some ideas of how you can implement the web like popups that you have been discussing. In this scenario I have multiple hotspots but only one hotspot template. This allows you to create a single popup element and use it for an unlimited number of hotspots.

https://tonyredhead.com/pano2vr/hotspot ... nd-iframes

cheers,

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
markleaf
Posts: 8
Joined: Fri Nov 02, 2018 8:41 pm

Hopki wrote: Sat Nov 03, 2018 1:50 pm Hi,
If you look at the video info component you will see it uses information from a point hotspot but displays in a text bos not associated with the hotspot template.
This is because it is using a set value action.
When the mouse is over the hotspot you can then read the data stored in the hotspot title and description text boxes, but as soon as you move the mouse you brake the connection. So what you do is have a set value action so when you are over the hotspot you can “set” its data to a text box in the skin.
Regards,
Hopki
Hi Hopki,

Thank you so much for the hint. Now I understand how the "Set Value" action works. Tried with the method, works exactly as I wanted, goal achieved. Thank you!
However, still kinda confused with the "Set Value" action, that how does the target know which of its inputs the value is set for? In my case, I set value as $hd, and choose a text element as the target. It makes sense that the text element accepts the value as its text content. While if you think further, why can't the value be other texts input, say, CSS class found in the Advanced tab? I tried set the value as digits wanting to see if the text element would take that as its position or size or some other controller that needs digits input, and surprisingly found it still take the value as the texts content. So I guess there are certain inputs each element accepts from the Set Value action, right? Is there any further information for what input every element will accept value from the Set Value action? Just curious.
markleaf
Posts: 8
Joined: Fri Nov 02, 2018 8:41 pm

Tony wrote: Sat Nov 03, 2018 10:54 pm Hi,

If you take a look at my tutorial 'Hotspot Templates and iFrames' it may give you some ideas of how you can implement the web like popups that you have been discussing. In this scenario I have multiple hotspots but only one hotspot template. This allows you to create a single popup element and use it for an unlimited number of hotspots.

https://tonyredhead.com/pano2vr/hotspot ... nd-iframes

cheers,

Tony
Hi Tony,

Thank you for the tutorial. Although displaying a web like popup is not the key in my case, the tutorial still teach me something useful and valuable, to pass node specific information to other node via variables. In my case, this is exactly the origin where all problems started. Very clever way to solve it! Thank you again for the helpful information and great tutorial!
markleaf
Posts: 8
Joined: Fri Nov 02, 2018 8:41 pm

markleaf wrote: Sun Nov 04, 2018 2:13 am
Tony wrote: Sat Nov 03, 2018 10:54 pm Hi,

If you take a look at my tutorial 'Hotspot Templates and iFrames' it may give you some ideas of how you can implement the web like popups that you have been discussing. In this scenario I have multiple hotspots but only one hotspot template. This allows you to create a single popup element and use it for an unlimited number of hotspots.

https://tonyredhead.com/pano2vr/hotspot ... nd-iframes

cheers,

Tony
Hi Tony,

Thank you for the tutorial. Although displaying a web like popup is not the key in my case, the tutorial still teach me something useful and valuable, to pass node specific information to other node via variables. In my case, this is exactly the origin where all problems started. Very clever way to solve it! Thank you again for the helpful information and great tutorial!
BTW, Tony,
Just a little comment for your tutorial, kinda off the topic though. I didn't follow all your steps to really create a project like that cause you explained every detail very clearly that I feel I can do the exercise by just imagining. :) However, regarding the part where you warned to reset variable after it has been used once, although you did explain why, I still don't understand why would that be necessary. As every time you click a hotspot, the variable will be set with a new value, which should reset the variable at the same time. Could this indicate some speciality how pano2vr deals with variables? Just curious.
A very good tutorial to read for everyone has similar goals, definitely recommended.
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi Markleaf,

Thanks for the kind words re the tutorial. I'm glad it gave you some insights.
However, regarding the part where you warned to reset variable after it has been used once, although you did explain why, I still don't understand why would that be necessary. As every time you click a hotspot, the variable will be set with a new value, which should reset the variable at the same time. Could this indicate some speciality how pano2vr deals with variables? Just curious.
Yes this was something I ran across while writing up the tutorial. When the issue arose I created a text box and added the text $(*MyPageURL) so I could see what variable was being set. Clicking on both hotspots I would see 'velimir' and then 'watercolour' in the text box but only the first clicked hotspot would show the html file! To get it working I had to reset the variable to blank between hotspot clicks.

I wonder if Hopki has some insight on why this is so?

cheers,

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
Post Reply