View Single Post
  #2  
Old 12-09-2009, 01:17 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,465
If you put the code that gets the button and joystick data into a timer function what kind of values are printed out in the input/output window?
Code:
def showData():

	data = tracker2.getData()
	print data[8], data[9]

	state = int(data[7])
	if state & 1:
		print 'Button 1 is down'
		
vizact.ontimer(0, showData)
Reply With Quote