View Full Version : Oculus setZoom
mshukun
10-08-2014, 11:23 AM
It appears that there are more Oculus related modules in Vizard 5 and I truly appreciate newly added functions. However, I encountered a problem that not to be able to zoom in and out using Xbox controller. It was working with the Vizard 5 beta version, but the code no longer work with the Vizard 5 (the code shown below). I appreciate your help and thank you in advance.
self.zoom = 1
def setZoom(self):
if joy.isButtonDown(6):
self.zoom = self.zoom - 0.001
elif joy.isButtonDown(5):
self.zoom = self.zoom + 0.001
hmd.setZoom(self.zoom)
vizact.ontimer(0, self.setZoom)
Can you narrow down the problem to either the joystick code or the zoom command? Does the zoom command work for you on its own?
import oculus
hmd = oculus.Rift()
hmd.setZoom(1.5)
mshukun
10-20-2014, 10:57 AM
I found that setZoom is not working... How can I fix the problem? I have Oculus DK1.
mshukun
10-24-2014, 08:04 AM
I would very much appreciate any of your inputs regarding the Oculus setZoom function. I tested <hmd>.setZoom() for both 360 panorama and the 'piazza.osgb', but I wasn't able to make the function work. I didn't have any problems with Oculus setZoom() using Vizard 4 and Vizard 5 Beta so I am wondering if I need to do something extra or different approach for Vizard 5.
Thank you in advance.
import viz
import oculus
viz.setMultiSample(4)
viz.fov(60)
viz.go(viz.FULLSCREEN)
hmd = oculus.Rift()
viz.link(hmd.getSensor(), viz.MainView)
# I tested various numbers for hmd.setZoom(), but it is not working...
hmd.setZoom = (1.5)
env = viz.addEnvironmentMap('C:/Program Files/WorldViz/Vizard5/resources/townhall_L.jpg')
sky = viz.addCustomNode('skydome.dlc')
sky.texture(env)
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.