WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 10-08-2014, 11:23 AM
mshukun mshukun is offline
Join Date: Jan 2013
Posts: 32
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.

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 
vizact.ontimer(0, self.setZoom)
Reply With Quote
Old 10-08-2014, 01:05 PM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,471
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()
Reply With Quote
Old 10-20-2014, 10:57 AM
mshukun mshukun is offline
Join Date: Jan 2013
Posts: 32
I found that setZoom is not working... How can I fix the problem? I have Oculus DK1.
Reply With Quote
Old 10-24-2014, 08:04 AM
mshukun mshukun is offline
Join Date: Jan 2013
Posts: 32
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


hmd = oculus.Rift(), 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')
Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with navigation trough DK2 Oculus vantsal Vizard 2 12-11-2014 03:18 AM
Oculus DK1 and DK2 in Vizard 5 Jeff Vizard 3 10-02-2014 11:00 AM
Oculus Rift Fullscreen teklab Vizard 6 05-21-2014 06:11 AM
oculus rift and inertia cube interaction problems apboone Vizard 4 03-13-2014 10:45 AM
Html and vizlink on Oculus HMD mshukun Vizard 3 10-30-2013 09:56 AM

All times are GMT -7. The time now is 11:08 AM.

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