Noah Zuo
Noah Zuo

Reputation: 108

Why are the animation rotation value in Maya different from that in Unity?

I have a FBX file with animation in it. When I import it into Maya(2017), the rotation value of bone 'arm_r_shoulder' looks like this:

maya Image

But the value just changed after importing it into Unity(5.6.1f1):

Unity Image

The fbx can be downloaded here.

My question is, why are those values different? And how should I handle that?

Upvotes: 1

Views: 1856

Answers (1)

Andy Jazz
Andy Jazz

Reputation: 58483

I suppose it's the Rotate Order and/or Order of Transformation issues. At first, check what Rotate Order in Maya and then in Unity. This parameter must be the same in both packages.

enter image description here

You can change the Rotate Order but preserve the overall transformation in Maya using this line of code:

import maya.cmds as cmds
cmds.xform(preserve=True, rotateOrder='yzx')

Also, there's Euler rotation vs Quaternion Rotation scheme: enter image description here

import maya.cmds as cmds
cmds.rotationInterpolation('polyModel_rotateY', convert='quaternion')

Read this post to know how to make conversions using Python: Quaternion to Euler Rotations.

Upvotes: 0

Related Questions