PDA

View Full Version : Child node coordinates


fabioped
10-08-2013, 08:25 AM
I have this sample 3ds file with 4 objects:
https://dl.dropboxusercontent.com/u/178438/teste.3ds

How can I see the relative coordinates of these objects?

From this:

def update(a):
p = viz.pick(info=True)
print p.object.getPosition(viz.ABS_GLOBAL)

viz.callback(viz.UPDATE_EVENT, update)

I always see [0,0,0]

using viz.REL_GLOBAL I see the same.

Jeff
10-09-2013, 02:40 PM
If you open up that model in Inspector and click on each of the sub-parts you'll see that the selection origin does not change. Each sub-part must have it's own transform to return a different position. Take a look at the video tutorial in the Hierarchical Models (http://kb.worldviz.com/articles/1157) article. That shows an example of setting up the hierarchy in Max and getting the absolute positions of sub-parts in Vizard.