orientation change to trigger panorama change?

Q&A about the latest versions
Post Reply
hromain
Posts: 42
Joined: Wed Apr 11, 2018 12:12 pm

Hello,

I'm working with two flat image nodes. One is oriented for vertical viewing and one for horizontal viewing. I'm trying to program the skin so the correct panorama shows if the orientation changes (if a user rotates their mobile device, for example). I have been trying to program an action in my code block element, but I'm not seeing a way to make the orientation change be a trigger. Any advice?

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

Hi,
Have a look at the attached project.
It opens pano 2 if landscape and pano 1 if portrait.
There is a variable and all the magic is done in the container, orientation_trigger.
Regards,
Attachments
project.zip
(24.46 KiB) Downloaded 442 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/
hromain
Posts: 42
Joined: Wed Apr 11, 2018 12:12 pm

Thanks, this is helpful, but I was actually wondering if there's a way to change the panorama after the initial load. So for example, if the user launches the app on a mobile device in portrait orientation but then rotates their device later. Is there a way to use that orientation change to trigger an action?
User avatar
Hopki
Gnome
Posts: 13029
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
Please see Project 2.
It has a new variable with a variable logic block.
The container has Variable Changed actions to change the panoramas.
Regards,
Attachments
project_2.zip
(25.21 KiB) Downloaded 470 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/
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi Hopki,

Very elegant solution. That's going in to my Hopki all stars folder :D

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/
User avatar
Hopki
Gnome
Posts: 13029
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

:D
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/
hromain
Posts: 42
Joined: Wed Apr 11, 2018 12:12 pm

This is exactly what I needed, thank you! This is the first time I've noticed the logic block on the variable itself; very cool.
Post Reply