View Single Post
  #7  
Old 04-13-2017, 11:24 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,460
Try using the viztask.waitSensorDown and viztask.waitSensorUp commands:

Code:
def ManualCursorButtonTask():

	while True:
		yield viztask.waitSensorDown(remote, oculus.BUTTON_REMOTE_ENTER, priority=viz.PRIORITY_GUI_HANDLER-1)
		canvas.sendMouseButtonEvent(viz.MOUSEBUTTON_LEFT, viz.DOWN)
		yield viztask.waitSensorUp(remote, oculus.BUTTON_REMOTE_ENTER, priority=viz.PRIORITY_GUI_HANDLER-1)
		canvas.sendMouseButtonEvent(viz.MOUSEBUTTON_LEFT, viz.UP)
Reply With Quote