![]() |
#1
|
|||
|
|||
![]()
Hi.
Now I finally solve my problem(I posted before). But only one thing make me confused. When I use link, source data is different from destination data. Uh, for example.... Code:
sensor=viz.addSensor('patriot') hand=viz.add('hand.cfg') bone=hand.getBone('bone index 1-2') bone.lock() link=viz.link(sensor,bone) def print(e): print sensor.getEuler(), bone.getEuler() viz.callback(viz.UPDATE_EVENT,print) Do you have any idea for this? Thank you very much. |
#2
|
|||
|
|||
Link objects do not get updated until later on in the update cycle. There are a few ways to deal with this.
1) Register your callback with a priority greater than viz.PRIORITY_LINKS 2) Manually update the link before retrieving the values from the bone: Code:
link.update() print sensor.getEuler(), bone.getEuler() Code:
print link.getEuler() |
#3
|
|||
|
|||
Hi, farshizzo.
Thank you for your advice. I didn't know "viz.PRIORITY_LINKS". I'll try the manually update method you taught me. Thank you again. |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using 5DT plug-in with the data coming through network... | mcicek | Vizard | 1 | 05-18-2009 05:17 PM |
Flagging the Data | Elittdogg | Vizard | 5 | 04-11-2008 11:40 AM |
Flock of Birds question (again) | Elittdogg | Vizard | 24 | 12-04-2007 09:37 AM |
5DT Data Glove 5 Ultra Flexure Question | bjgold | Vizard | 1 | 07-25-2006 02:58 PM |
tracking using quaternarion data | jfreeman | Vizard | 2 | 06-01-2005 08:48 AM |