WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 06-02-2005, 12:46 PM
jargon jargon is offline
Join Date: May 2005
Location: Es Bee
Posts: 9
Unhappy wierd headPos translation

I don't think I know quite how the translation fo HEAD_POS works. for example let's say I wanted to translate the HEADPOS 1 in the X direction everytime a user hit the "e" key. I would think the following code would work

def mykeyboard(key):
if key== 'e':
court.personPos= [court.personPos[0]+1, court.personPos[1], court.personPos[2]]

def updateView(self):

However this is very much not the case- this translates the head position 1 the first time 3 the second time, 4 the thrid time and so on. I realize it's probably translating it relative to its previous position but when I tried to translate using viz.ABSOLUTE_WORLD the same thing happened leaving me confused. Do you know a way I can accomplish this?
Reply With Quote
Old 06-02-2005, 01:32 PM
farshizzo farshizzo is offline
WorldViz Team Member
Join Date: Mar 2003
Posts: 2,849

You need to get a handle to the main viewpoint to translate the head position.
view = viz.get(viz.MAIN_VIEWPOINT)

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

All times are GMT -7. The time now is 03:27 AM.

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