Exemplo n.º 1
0
def triggerLeftCheck(controller):
	while True:
		yield viztask.waitSensorDown(controller, steamvr.BUTTON_TRIGGER)
		globals_oa.leftTriggerDown = True
		globals_oa.lhModelClosed.visible(True)
		globals_oa.lhModelOpen.visible(False)
		yield viztask.waitSensorUp(controller, steamvr.BUTTON_TRIGGER)
		globals_oa.leftTriggerDown = False
		globals_oa.lhModelClosed.visible(False)
		globals_oa.lhModelOpen.visible(True)
def JumpTask(controller):
	global test_num, test_text, consent
	"""Task that users trigger button press/release to jump to painting locations"""
	while True:

		# Wait for trigger to press
		yield viztask.waitSensorDown(controller, steamvr.BUTTON_TRIGGER)

		# Start highlighting task
		highlightTask = viztask.schedule(HighlightTask(controller))

		# Wait for trigger to release
		yield viztask.waitSensorUp(controller, steamvr.BUTTON_TRIGGER)

		# Stop highlighting task
		highlightTask.remove()

		# Intersect pointer with scene
		info = IntersectController(controller)
		print info.name
		if info.name == "side":
			consent = True;
			canvas.visible(False)
			background.visible(viz.OFF)
			background2.visible(viz.OFF)
		if info.name == "basketball":
			if(test_num == 2):
				consent = True;
				canvas.visible(False)
				background.visible(viz.OFF)
				background2.visible(viz.OFF)
			else:
				
				test_num = test_num + 1
				panel.setText(test_text[test_num])
				if(test_num == 2):
					background2.visible(viz.ON)
Exemplo n.º 3
0
    def hide_inst_continue_trigger(self):

        yield viztask.waitSensorDown(self.controller, steamvr.BUTTON_TRIGGER)
        self.scene.hide_instruction()