Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Programming (https://simplymaya.com/forum/forumdisplay.php?f=32)
-   -   query world coords (https://simplymaya.com/forum/showthread.php?t=31475)

Dann 04-12-2008 12:06 PM

query world coords
 
Hey,

Can anyone help me figure out how to query the world space transform and rotational values of an object? I've looked all through the docs and just can't find it. Pivot points no problem, but I need rotation as well so that doesn't help me.

Thanks a bunch.

-tarmy

bendingiscool 05-12-2008 05:50 AM

Use xform...

you can either store it in a float array or a vector like so..

///////////////////////

vector $translates = `xform -query -worldSpace -t name of object`;

///////////////////////

you can replace the t with an r for rotates.

Chris

Dann 05-12-2008 06:55 AM

:beer:

exactly right. much obliged. (fyi... the rotate flag is -rt, but you got me close enough and I appreciate your help)

gster123 05-12-2008 08:05 AM

Yeah xforms the first port of call when doing anything to do with translations/rotiations


All times are GMT. The time now is 09:40 PM.

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