View Single Post
  #1  
Old 08-31-2007, 07:24 AM
Elittdogg Elittdogg is offline
Member
 
Join Date: Aug 2007
Posts: 77
Question Head motion tracking/Viewpoint

I'm very stuck stuck right now, so any help would be greatly appreciated.

Basically, I need to be able to get the program to display an image of a wall and while using FOB (Flock of Birds) to track head movement, I need the viewpoint to change along with the head movement. In other words, if I'm looking at the center of the wall and I need to look at the top left corner, I need to figure out how to get the viewpoint to change with my head movement.

So far this is what I have:

import viz

tex1 = viz.add('wall.jpg')
quad = viz.add(viz.TEXQUAD)
quad.translate(0,1,8)
quad.scale(12.8, 10.24)
quad.texture(tex1)

...

viz.reset(viz.HEAD_POS|viz.HEAD_ORI)
viz.translate(viz.HEAD_POS,data1[0],data1[1],data1[2])
viz.rotate(viz.HEAD_ORI,data1[5], (data1[4]+90) ,data1[3])

The problem is two-fold. When I run this, the picture looks like it's "tumbling" everywhere. Additionally, I also need to figure out how to program in an "inversion" to the tracking system. (Eg. So that when something comes in "physically" from the right field of view it looks as if it were coming from the left field of view and as if it were inverted). Do I just put a negative sign somewhere to flip it?

Any help would be appreciated. Thank you.
Reply With Quote