Thread: Head Height
View Single Post
  #6  
Old 02-12-2007, 10:38 AM
Jerry Jerry is offline
Member
 
Join Date: Jun 2004
Posts: 105
Simplicity is a virtue. This works for me.

Code:
from viz import *

go()

room = add('gallery.ive')

pos = add('vizppt.dls')
ori = add('intersense.dls')
tracker()

def onKeyDown(key):
	
	if key == 'r':
		pos.reset()
		ori.reset()
		
	if key == '1':
		eyeheight(1.8)
	if key == '2':
		eyeheight(0)
	if key == '3':
		eyeheight(4)
		
callback(KEYDOWN_EVENT,onKeyDown)
Initially the eyeheight comes out too high for some reason, but if
you hit 'r' it makes it 1.8m. Also, you can change the eyeheight to
whatever you want using the viz.eyeheight(height) command.
After that hitting 'r' will reset the eyeheight to whatever 'height' is.
Reply With Quote