WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Head Height (https://forum.worldviz.com/showthread.php?t=998)

Plymouth 02-08-2007 05:40 AM

Head Height
 
Does Vizard have a default setting that constrains changes to the height of the viewpoint?

I'm tracking movement with PPT. Whenever I try to raise my head's elevation (jump) there's no response and when I try to lower it (crouch) it suddenly moves my headheight to the ceiling and then lowers it from there. I'd like to be able to move my head around in three dimensions without getting strange effects.

Gladsomebeast 02-08-2007 10:53 AM

Do you have view collision on? If using PPT head tracking you should not have view collision on.

Try PPT head tracking in the world demos like the Gallery. It should work correctly here.

mspusch 02-08-2007 12:31 PM

in the gallery, also make sure to comment out viz.collision(viz.ON)

Plymouth 02-09-2007 06:04 AM

This is all becoming entirely too strange. When I comment out the viz.collision(viz.ON) line it puts my eyeheight at the top of the room all the time. And now when I try to run Gallery with the tracker box check it crashes while loading. It didn't used to do that. I haven't changed trackers or anything like that recently.

Gladsomebeast 02-09-2007 09:25 AM

Here is the proper way to setup PPT and Intersense head tracking in Vizard 3.0. If you are not using Vizard 3.0, download it.

Code:

import viz
viz.go()

PORT_PPT = 0 #Com port number. Zero to search through COM1 to COM4
headPosSensor = viz.add('vizppt.dls')
PORT_INTERSENSE = 0 #Com port number. Zero to search through COM1 to COM4
headOriSensor = viz.add('intersense.dls')
headCombined = viz.mergeLinkable( headPosSensor, headOriSensor )

# Link hybrid head sensor to view and don't offset by eyeheight
headLink = viz.link(headCombined, viz.MainView, dstFlag = viz.LINK_POS_RAW)

#add world
viz.add('court.ive')


Jerry 02-12-2007 10:38 AM

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.


All times are GMT -7. The time now is 12:56 AM.

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