View Single Post
  #15  
Old 02-01-2005, 03:40 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Try the following instead. After the script has started press the 'r' key to reset the ppt:
Code:
import viz
viz.go()

ppt = viz.add('vizppt.dls')
ppt.command(6,'',1,1,1)
ppt.reset()

viz.tracker()

viz.eyeheight(1.8)

def ontimer(num):
	print viz.get(viz.HEAD_POS)[1]

viz.callback(viz.TIMER_EVENT,ontimer)
viz.starttimer(0,0.1,viz.FOREVER)

def onkeydown(key):
	if key == 'r':
		ppt.reset()

viz.callback(viz.KEYDOWN_EVENT,onkeydown)
Reply With Quote