Maya for 3D Printing - Rapid Prototyping
In this course we're going to look at something a little different, creating technically accurate 3D printed parts.
# 1 19-04-2004 , 10:51 AM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800

worldspace position without using xform

What's the easiest way to get a camera's position in worldspace without using the xform command. Keep in mind that it can be parented under other stuff so it may not have any local translation or anything.

Thanks
Alan


Technical Director - Framestore

Currently working on: Your Highness

IMDB
# 2 19-04-2004 , 02:20 PM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
done it.

You can use:

$myArr = `getAttr -t $myTime $myObject.wm[0]`;
xPos = $myArray[12];
yPos = $myArray[13];
zPos = $myArray[14];

this uses the world matrix to give you the exact world space position.

user added image
Alan


Technical Director - Framestore

Currently working on: Your Highness

IMDB
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads