Oculus裂口相机使用Vizard转动问题

时间:2015-02-23 03:05:13

标签: python mousemove oculus vizard virtual-reality

我正在尝试使用Vizard 5来模拟Oculus裂缝。当oculus也连接到主视图时,我无法将鼠标链接到MainView方法,这意味着我想让鼠标同时移动相机和眼睛。任何帮助将不胜感激。

这是到目前为止的代码:

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 个答案:

没有答案