Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Reporting of Local Angles

Reporting of Local Angles

Anonymous
Not applicable
582 Views
4 Replies
Message 1 of 5

Reporting of Local Angles

Anonymous
Not applicable

Need: The Maxscript method for reporting an objects local orientation in space relative to the WCS.

 

Say I have an object starting off (and keyframed) orthoganal to the world, oh, a shoebox shaped box with the length of the box pointing in pure X, width in Y and top of the box straight up in Z.  Then it is keyframed into other positions and orientations.  I often use local X,Y,Z rotations to adjust it's orientation in space.  The Max keyframe data shows only X,Y,Z values related to World Space.  What I want to know is the X,Y & Z values of the object relative to it's local gizmo as offset from it's starting position.

 

I know why MAX works the way it does with angles (Quaternion, Euler controller, etc...), I don't need a history lesson there.  I also know about XYZ ordering and how the order of the appied transforms give different results.  Don't care about that.  When the positioning is all said and done, I need to know its relative orientation in space.

 

I assume there is some math involved in a local to world coordinate system transformation, unless Maxscript has some query tools to shortcut the process.  And not sure how you get a description of an objects Local axis reported.  Every object in Max has a local gizmo.  That info must be in the database.

 

Thank you in advance for any assistence.

Regards,

Buck Wyckoff

Buckward Digital

0 Likes
583 Views
4 Replies
Replies (4)
Message 2 of 5

istan
Advisor
Advisor
I'm not really sure if I fully understood which TM you actually need. But you always can read any object's TM at any time and I usually use 'TM * Inverse(Parent_TM)' to get the local TM.
0 Likes
Message 3 of 5

Anonymous
Not applicable

Thanks.

Maybe my wording was confusing.  I know there is no local coordinate system stored in MAX or anything like that.  There is only the world. My client wants to know the Yaw, Pitch & Roll of an object's orientation in space.  To do that, I need to know the object's X,Y & Z angles with respect to the Local Coordinate System (the Local Gizmo).

 

I'm guessing this means you have to take the World rotation values and transform that data such that you get the same orientation in space but the rotations are reported relative to the objects local axis. 

0 Likes
Message 4 of 5

Anonymous
Not applicable

You are probably looking for

 

[ in ] coordsys <coordsys_spec>

 

Here's the link to the documentation: coordsys

0 Likes
Message 5 of 5

Anonymous
Not applicable

Thanks.

I'll look into it.

0 Likes