Pan node to specific direction on click
- Hopki
- Gnome
- Posts: 13029
- Joined: Thu Jan 10, 2008 3:16 pm
- Location: Layer de la Haye, Essex UK
- Contact:
Hi,
Yes you would use a move to view action.
The move to view action can use a pan angle, use the viewing parameters to see which pan angle you would need to use.
Regards,
Hopki
Yes you would use a move to view action.
The move to view action can use a pan angle, use the viewing parameters to see which pan angle you would need to use.
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/
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/
The problem I was having with that is that each pano would require different parameters in the "move to view" action.
But I did get it to work this way:
Source: Mouse Click
Action: Go to URL
URL: <javascript call here>
Target: _self
Javascript for each compass cardinal point:
Pan to north
javascript:pano.moveTo(pano.getPan()-pano.getPanNorth(),pano.getTilt(),pano.getFov(),5.0);
Pan to south
javascript:pano.moveTo((pano.getPan()-pano.getPanNorth())+180,pano.getTilt(),pano.getFov(),5.0);
Pan to east
javascript:pano.moveTo((pano.getPan()-pano.getPanNorth())-90,pano.getTilt(),pano.getFov(),5.0);
Pan to west
javascript:pano.moveTo((pano.getPan()-pano.getPanNorth())+90,pano.getTilt(),pano.getFov(),5.0);
It works great.
Thanks,
Kevin
But I did get it to work this way:
Source: Mouse Click
Action: Go to URL
URL: <javascript call here>
Target: _self
Javascript for each compass cardinal point:
Pan to north
javascript:pano.moveTo(pano.getPan()-pano.getPanNorth(),pano.getTilt(),pano.getFov(),5.0);
Pan to south
javascript:pano.moveTo((pano.getPan()-pano.getPanNorth())+180,pano.getTilt(),pano.getFov(),5.0);
Pan to east
javascript:pano.moveTo((pano.getPan()-pano.getPanNorth())-90,pano.getTilt(),pano.getFov(),5.0);
Pan to west
javascript:pano.moveTo((pano.getPan()-pano.getPanNorth())+90,pano.getTilt(),pano.getFov(),5.0);
It works great.
Thanks,
Kevin
Hi Kevin,
Thanks for the information re using Go to URL for the pan movement, very helpful.
cheers,
Tony
Thanks for the information re using Go to URL for the pan movement, very helpful.
Can I ask what actions you are using to effect the compass dial rotation?I should have noted that I am rotating a compass dial with the cardinal points (as the pano pans) around a static compass needle
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/
It's just a modifier:
Target: Rotate
Source: Pan North
Factor: -1
Offset: 0
Note that this is not all my work - I leveraged some assets from others. But here is a component item for it:
Update - I just updated the component to add click spots for Northeast, Southeast, Northwest, and Southwest. Now there are no "dead spots" on the compass dial.
Component attached.
Target: Rotate
Source: Pan North
Factor: -1
Offset: 0
Note that this is not all my work - I leveraged some assets from others. But here is a component item for it:
Update - I just updated the component to add click spots for Northeast, Southeast, Northwest, and Southwest. Now there are no "dead spots" on the compass dial.
Component attached.