View Single Post
  #5  
Old 09-27-2005, 03:52 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

I just ran the following script and it works fine on the system here. Can you try it out and let me know if you have problems with it. Also, are you calling the reset() command on the ppt sensors?
Code:
import viz
viz.go()

ppt1 = viz.add('vizppt.dls')
ppt2 = viz.add('vizppt.dls')

viz.startlayer(viz.LINES)
viz.linewidth(3)
viz.vertexcolor(viz.RED)
viz.vertex(0,0,0)
viz.vertex(0,0,1)
rod = viz.endlayer()

viz.clearcolor(viz.GRAY)
viz.move(0,0,-5)
viz.add('tut_ground.wrl')

def ontimer(num):
	rod.translate(ppt1.get())
	rod.lookat(ppt2.get())

viz.callback(viz.TIMER_EVENT,ontimer)
viz.starttimer(0,0,viz.FOREVER)
Reply With Quote