#1
|
|||
|
|||
<node3d>.getPosition() returns [0,0,0] all the time...
Hi,
I create a simple scene in 3DSM, export as either WRL or IVE format. All the scene contains is a plane, a few boxes and a sphere. All 3 shape objects are positioned away from the origin. When i try and get access to one of the shapes: Code:
scene = viz.add(scene.ive') scene.disable(viz.LIGHTING,'') sphere = scene.getChild('Sphere01') print "sphere pos: ", sphere.getPosition(viz.ABS_GLOBAL) Any reason why this is happening please? Thanks, DB |
#2
|
|||
|
|||
If you right click on your scene node in the Vizard resources window and select properties, then expand the VIZARD_NODE you'll see your Sphere01 child. Expand that and you will see 'Sphere01-GEODE', which is what you want to use.
Code:
sphere = scene.getChild('Sphere01-GEODE') print "sphere pos: ", sphere.getPosition(viz.ABS_GLOBAL) |
#3
|
|||
|
|||
Thanks for your reply; that worked fine! Could you explain why extra characters are added to the end of the node name? Why does it work like this to get access to a child node:
Code:
dummy = scene.getChild('dummy') Thanks. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
timer question | Elittdogg | Vizard | 5 | 10-10-2007 02:49 PM |
Two animations performed by avatar at the same time | michelcm3 | Vizard | 1 | 09-21-2007 09:51 AM |
Printing of System Time | Uttama_vizard | Precision Position Tracker (PPT) | 2 | 09-19-2007 02:38 PM |
Avatar always returns in initial position | pattie | Vizard | 2 | 08-31-2006 08:15 PM |
Run Time Crash | enkeli | Vizard | 4 | 03-08-2006 02:36 PM |