WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-23-2013, 03:22 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
If you want the compass to rotate with the viewpoint you can create a link and set the mask to orientation only. If you want the compass yaw to be the opposite of the viewpoint use the link.swapEuler command:
Code:
import viz
import vizshape
viz.go()

viz.add('dojo.osgb')

compass = vizshape.addArrow()
compass.setPosition([0,0.5,0])
compassLink = viz.link(viz.MainView,compass,mask=viz.LINK_ORI)

#Negate yaw value
#compassLink.swapEuler([-1,2,3])

subWindow = viz.addWindow(pos=[0.5,1])
subWindow.setSize(0.5,0.5)
view = viz.addView()
view.move([0,-1,-4])
subWindow.setView(view)
Reply With Quote
Reply

Tags
compass, euler, view rotate

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:43 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC