View Single Post
  #4  
Old 10-22-2010, 10:45 AM
masaki masaki is offline
Member
 
Join Date: Jan 2008
Posts: 63
Hi,

You need to scale your crosshair object much larger and also instead of viz.monitor.width/height you need to do viz.MainWindow.getSize( viz.WINDOW_ORTHO ) and since you're in stereo you need to multiply the width by .25 not .5. Alternatively, you can link it to viz.CenterCenter.
Code:
import viz
viz.go(viz.FULLSCREEN)

viz.add('gallery.ive')

crosshair = viz.addTexQuad(viz.ORTHO,texture=viz.add('crosshair.png'))
crosshair.scale(100,100,1)
w,h = viz.MainWindow.getSize( viz.WINDOW_ORTHO ) 
crosshair.setPosition([0.25*w,0.5*h,0])

slider = viz.addSlider(pos=(0.5,0.1,0))
slider.set(0.5)
def SetOffset(pos):
	offset = vizmat.Interpolate(-400,-100,pos)
	viz.MainWindow.setOrthoOffset( offset )
	print offset
vizact.onslider(slider,SetOffset)

import nvis
hmd = nvis.nvisorSX111()
Best,
Masaki
Reply With Quote