![]() |
#1
|
|||
|
|||
![]()
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]] updateView() def updateView(self): viz.translate(viz.HEAD_POS,self.personPos[0],self.personPos[1],self.personPos[2],viz.ABSOLUTE) 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?
__________________
:-$ |
#2
|
|||
|
|||
Hi,
You need to get a handle to the main viewpoint to translate the head position. Code:
view = viz.get(viz.MAIN_VIEWPOINT) view.translate(self.personPos) |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|