View Single Post
# 6 24-06-2007 , 05:12 AM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
you have to remember about object space and world space. If you use that getAttr command on the vertex pos you may not always get the worldspace position.


So I would use the xform command (believe me it's your new best friend!) so I would use

string $obj = "myObject";
float $pos[] = `xform -q -ws -t ($obj + ".vtx[0]")`;

now you can use the array to access the postions:

print("pos: " + $pos[0] + " " + $pos[1] + " " + $pos[2]);

That's about it really

user added image
Alan


Technical Director - Framestore

Currently working on: Your Highness

IMDB