#1
|
|||
|
|||
Getting Position
How can I find the absolute position in space of a 3d text object. I am using a 3d text "+" sign as a pointer in my program. It is attached to a parent node (handNode) which moves based on a motion tracker.
handNode = viz.add(viz.TEXT3D,'.') #handNode.visible ( viz.ON ) handNode.color(1,0,0) # red handNode.scale(.005, .005, .005) pointer = handNode.add( viz.TEXT3D,'+') #pointer.visible ( viz.ON ) pointer.translate(0, 0, 12) pointer.color(1,0,0) # Red pointer.scale(18, 18, 18) Right now, I am using " pointer.get(viz.POSITION) " to get its position in 3d space. It can be seen in this statement of the program: DaAngleBearing = self.findBearing( viz.get(viz.HEAD_POS), pointer.get(viz.POSITION) ) DaAnglePitch = self.findPitch(viz.get(viz.HEAD_POS), pointer.get(viz.POSITION) ) Right now, when I use print outputs to find what the program is doing, it looks like it's giving me the pointers position relative to another object, and that relative position is going into the statement above and being used to calculate the angle and pitch between head and pointer. I need to use the absolute position of the pointer. Any suggestions are appreciated. |
#2
|
|||
|
|||
pointer.getPosition(viz.ABS_GLOBAL) should give you the absolute position. Check out this tutorial: http://docs.worldviz.com/vizard/inde...orial_list.htm
|
Thread Tools | |
Display Modes | Rate This Thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Position and Radius of Sphere | hotshotiguana | Vizard | 1 | 03-23-2011 01:53 PM |
Translate view from sensor position to lens position? | Kaminski | Vizard | 4 | 03-09-2011 11:36 AM |
writing joystick position to a data file | Saz | Vizard | 3 | 12-17-2008 06:18 AM |
default start position | erchrastil | Vizard | 2 | 06-23-2008 09:15 AM |
Avatar always returns in initial position | pattie | Vizard | 2 | 08-31-2006 09:15 PM |