![]() |
|
#5
|
|||
|
|||
|
sorry, i'm new to this format so i thought it would preserve the tabs that were in place. here's the code again:
import viz import vizact import time import math import random import winsound ground = viz.add('Models/ground_2m.ive') pit = viz.add('Models/ground_pit_new.ive') viz.go(viz.STEREO | viz.FULLSCREEN) light1 = viz.addLight() #Add an overhead light light1.setEuler(0,90,0) ## Prompt for the participant's identification number - generally keep this uncommented! ## keyControl = viz.input('Using Tracker? 1 = Yes, 2 = No') #subject = viz.input('What is the participant number?') if keyControl == 1: eyeohd = viz.input('What is the participants IOD?') viz.fov(43,1.395) #Cybermind specs ##Rename the main view ## view = viz.MainView #Link viewpoint with tracker, initialize boresite if keyControl == 1: #If you're using the tracker headTrack = viz.addSensor('intersense')#Ignore documentation stating you need "intersense.dls" - this is correct ##################################### #Initialize parameters for keyboard control MOVE_SPEED = 1.3 #m/s TURN_SPEED = 60 #deg/s #NOTE: Default eye height for keyboard control is 6', doesn't affect tracked viewpoint viz.phys.enable() # Enable physics viz.MainView.gravity (0) #This turns mouse control of view and mouse pointer off - very disconcerting for subjects! # Generally keep both viz.OFF, unless you have a specific need. viz.mouse(viz.OFF) viz.cursor(viz.OFF) Risen = True def masterLoop(num): global Risenviz.callback(viz.TIMER_EVENT,masterLoop) #This starts the timer. First value (0) is a timer identifier, second (1/60) is the refresh rate, third (viz.FOREVER) is how long it lasts viz.starttimer(0,1/60.0,viz.FOREVER) Reply With Quote |
|
|