[Closed] How to calculate one rotation order to another
I need to export some objects into game which uses XYZ rotation order.
Stock Max rotation order is ZYX.
I don’t know how to convert roation from one order to another.
There was similar topic, but it no answers te question:
http://forums.cgsociety.org/archive/index.php/t-221999.html
$.transform.rotation as eulerangles
returns by default in the order of x y z
a = $.transform.rotation as eulerangles
b = point3 a.z a.y a.x –preety one
–b = [a.z, a.y, a.x] –fast one to process
“Rotation order” no means just order of the values.
So that I say before is correct. In max we have ZYX rotation order.
It means the X rotation axis is most “free”. It’s like with parent objects:
Z -> Y -> X
Where X is child of Y, and Y is child of Z.
If you rotate Z axis the Y and X will be rotated too.
This movie will better explain that (watch at 3:00)
Also, if you need some different setup quickly, couldn’t you also swizzle the results you get?
Unless I didnt understant your issue right:
quatToEuler $.rotation order:6
if you search for quatToEuler method, it’ll give you the available orders. In this case 6 = ZYX
Perhaps you’re looking for something like <the object rotation> = (quatToEuler $.transform.rotation)
http://forums.cgsociety.org/showthread.php?f=98&t=906260
http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/does-quattoeuler24041-work
XYZ Controllers [left]Check [font=Verdana]XYZ Controllers[/font]
[/left]
[left][font=Verdana]
[/font]
[/left]
[left]
[/left]
[left]<Euler_XYZ>.x_rotation Float default: 0.0 – animatable
[/left]
[left]<Euler_XYZ>.y_rotation Float default: 0.0 – animatable
[/left]
[left]<Euler_XYZ>.z_rotation Float default: 0.0 – animatable
[/left]
[left]<Euler_XYZ>.axisOrder Integer default: 1
[/left]
[left]Get/set the order of application of the axis angles. Its value can be any of the following:
[/left]
[left]1 – XYZ
[/left]
[left]2 – XZY
[/left]
[left]3 – YZX
[/left]
[left]4 – YXZ
[/left]
[left]5 – ZXY
[/left]
[left]6 – ZYX
[/left]
[left]7 – XYX
[/left]
[left]8 – YZY
[/left]
[left]9 – ZXZ
[/left]