View Single Post
  #2  
Old 04-03-2013, 03:37 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,450
Yes, you can get the position and orientation of the tracker each frame and apply whichever parts of that you want:
Code:
import viz
import vizact
import vizcam
viz.go()

dojo = viz.addChild('dojo.osgb')

keyTracker = vizcam.addKeyboard6DOF()

def updateView():
	pos = keyTracker.getPosition()
	ori = keyTracker.getEuler()
	
	viz.MainView.setPosition([pos[0],1.8,0])
	viz.MainView.setEuler(ori)
	
vizact.onupdate(0,updateView)
Reply With Quote