Oculus rift Camera turn issue using Vizard

441 Views Asked by At

I'm trying to use Vizard 5 to make a simulation with the Oculus rift. I can't get the mouse to be linked to the MainView method while the oculus is also connected to the mainview, meaning I want to make the mouse move the camera and the oculus also at the same time. Any help would be appreciated.

This is the code so far:

import viz 
import oculus 
import vizcam 
import vizfx 
import sys
import vizact
import vizinfo

viz.go(viz.FULLSCREEN) 
view = viz.addView
#add Oculus as HMD 
hmd = oculus.Rift() 
hmd.getSensor

#links hmd to mainview, both mouse and hmd should be linked to mainview
viz.link(hmd.getSensor(), viz.MainView) 

#vizcam.WalkNavigate()

#make mouse invisible and activate mainview's collision
#viz.mouse.setVisible(viz.OFF)

#collison with objects set to on
viz.MainView.collision(viz.ON) 
viz.MainView.collisionBuffer(0.5)

#add model 
vizfx.addChild('AutoSave_house3D model.osgb') 

#add environment 
viz.addChild('sky_day.osgb') 

#create a sunlight 
sun = vizfx.addDirectionalLight() 
sun.color(1.0,1.0,0.8275) 
sun.setEuler(90,90,0) 
viz.go() 
0

There are 0 best solutions below