Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Programming (https://simplymaya.com/forum/forumdisplay.php?f=32)
-   -   worldspace position without using xform (https://simplymaya.com/forum/showthread.php?t=11471)

Alan 19-04-2004 10:51 AM

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

Alan 19-04-2004 02:20 PM

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.

:)
Alan


All times are GMT. The time now is 07:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018