WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Oculus setZoom (https://forum.worldviz.com/showthread.php?t=5183)

mshukun 10-08-2014 11:23 AM

Oculus setZoom
 
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.


Code:

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)


Jeff 10-08-2014 01:05 PM

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?

Code:

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 .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.


Code:

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)



All times are GMT -7. The time now is 03:50 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC