2

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() 
sdeole8264
  • 21
  • 1
  • 1
    Why do you want to move the camera with the mouse? This is highly discouraged with VR experiences and it can easily make people sick or disoriented. As per the oculus best practices guide http://static.oculus.com/sdk-downloads/documents/Oculus_Best_Practices_Guide.pdf "In general, avoid decoupling the user’s and camera’s movements for any reason." – K.L. Mar 09 '15 at 10:43

0 Answers0