View Single Post
  #2  
Old 11-16-2016, 05:36 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,466
Use the vizproximity.waitEnter command within a task function:

Code:
import viztask

def proximityTask():

	yield vizproximity.waitEnter(SensorIndexFinger)
	print 'entered sensor'
	yield viztask.waitTime(2)
	print 'two seconds elapsed'

viztask.schedule(proximityTask())
Reply With Quote