PDA

View Full Version : Using link to create offsets between sensors


Enlil
08-27-2008, 12:55 PM
Hello,
I am currently creating a demo using a head mount display and glove, whose positions are tracked by a polhemus patriot. I have used viz.link to link the glove and head mount display to their patriot sensors, as follows:

myroom = viz.add('room.wrl')
polhemus = viz.add('polhemus.dle')
patriot1 = polhemus.addPatriot();
patriot2 = polhemus.addPatriot();
hand_link = viz.link(patriot2, glove)
hand_link.setOffset([0, 1.8200000524520874, 0])

What I would really like to do, though, is to make the glove always appear in the proper relationship to the viewpoint, even if the main viewpoint changes. Is there an easy way to do this, or will I have to put some kind of statement into a timer that does it?

Thanks,
Christian

farshizzo
08-28-2008, 09:12 AM
The two sensors should already share the same relationship if they are connected to the same patriot device. If you are applying an offset to one of the links, then you will need to apply the same offset to the other link in order to maintain this relationship.

Enlil
08-28-2008, 11:28 AM
Thanks for the advice - that is pretty much what I figured, I just hoped there was some clever link statement I could use.

Christian