Rotation 3dsmax

Sorry guys, I’m a noob with 3DS max and my company assigned me a list of tool to do.
This is a really stupid question but in Maya I had no problem like this and I’m missing something in how Max work.
I create a sphere with a small rotation.
Inspecting the rotation in viewport in world space , the result is (50,0,0)
If I get the rotation from script with this command
in coordsys parent $.rotation as eulerAngles
The result is (-50,0,0)
Why? what I’m missing here?

I found that is a math problem actually , long story shor it is better to work with quaternion

Don’t use cordsys.
Use node transforms, it’s much simpler and a standard way of working with spaces across all DCC’s.
To get rotation in world space:
rot = <node>.transform.rotation
To get rotation in another nodes space ( normally parent ):
rot = ( <node>.transform * inverseHighPrecision <parent node>.transform ). rotation

Then convert from quat to euler:
rot = quatToEuler rot

<node>.rotation gives different results, if I remember correctly it will be the value of the top controller layer rather than the full value.

2 Likes