Animation Import off by 90 degrees

I’ve got some complex camera movement for some cinematic shots. The way I’ve been doing this is by animating the camera in my 3D app (I’ve tried it in both C4D and Maya), then bringing that C4D or .mb file into Unity, and applying its Animation to a Unity Camera.

The problem is two fold (both might be related). First, the animation plays but the camera is rotated (along Y axis) -90 degrees. So the animation plays right, just always sideways (and thus looking the wrong way). The second, is that some camera moves end up with the camera laying on its side…?

I’ve tried manually exporting as an FBX in both apps. Nothing doing. I’ve tried all the “Generation” settings in the Import setting. No go.

The hack, is to add 90 degrees to all the Rotate Y (or Rotate H) values. But that makes for really odd editing, and still doesn’t solve the problems of the camera rolling to its side.

What am I misunderstanding here? Any ideas?

Please go to Help->Report a problem and send us the animation file or the whole project folder. Please PM me with the case # after doing so.

Thanks Amir. Done.

I’m re-posting this solution to this topic in case others encounter the same problem:

Here are the steps:

  1. Drop your imported Maya file into the scene
  2. Parent ‘Main Camera’ under the camera1 node
  3. Zero out the position data for ‘Main Camera’, set the rotation to 0, -90, 0, and set the scale to 1.
  4. Play the animation

Here is a screencast of it:
http://screencast.com/t/zEU2zuYVBpr

Works well too. Thanks Amir!

Is this at all related to rotated transforms in character bone hierarchies?
I was trying to use transform.LookAt to rotate my character’s head (as suggested in the docs) and his head ends up turned on its side.
Not hard to fix in the code, just kind of annoying.

It’s a possibility. Maya, Max, and Unity all have different axis systems, which makes things difficult when choosing the “right” way to do things.