Auto Rotate with Gyro

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
User avatar
Hopki
Gnome
Posts: 13026
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
Been asked about this more than once so decided to post in the forum.
People want the Gyro for mobile devices but then want the Auto Rotate button to work.
The problem is the Gyro wants to rotate the pano in one direction and the Auto Rotate will want to rotate it in another so causes a bit of conflict.

There is a simple solution which works very well.
For this example I will use the Auto Rotate Silhouette component from the components tool box found in Pano2VR 5's skin editor.

Start a new skin and drag in the Auto Rotate Silhouette component.
Click the arrow to the left of the container "button_auto_rotate" to expand and see the child elements.
3.jpg
3.jpg (32.42 KiB) Viewed 3607 times
Select the element "start_rotate_image" and add the action:

Source: Mouse Click
Action: Go To URL
URL: javascript:gyro.disable();
Target: (leave blank)

Now grab the tab to the left of the action and slide it to the top so it looks like this:
1.jpg
1.jpg (38.48 KiB) Viewed 3607 times
Now select the element "stop_rotate_image" and add the action:

Source: Mouse Click
Action: Go To URL
URL: javascript:gyro.enable();
Target: (leave blank)

Now do the same and drag the action to the top.
2.jpg
2.jpg (33.85 KiB) Viewed 3607 times
Save and close the skin, what will happen is when the Auto Rotate is turned on the Gyro is turned off.
When Auto Rotate is turned off the Gyro is turned back on again.

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/
Post Reply