Weird Blender camera animation issue


I am new to Unity and Blender.
I have an issue with a camera animation that I have recorded in Blender.
Basically it is a very simple animation where camera is flying around the default cube.
Camera has a Track To constraint attached to it with the cube set as a target.
Everything works fine in Blender. After I exported my animation to FBX and imported it to Unity things started getting really weird. Unity picked up the animation as the Default Take. But it does not look even remotely the same in Unity. I figured that there must be some kind of axis mismatch between Unity and Blender and so far have tried about dozen different axis mappings - but none of them result in the correct animation.

Am I missing something or doing something wrong?

The reason I am using Blender for camera animation (and not Unity) in the first place is because I don’t know how to achieve similar functionality in Unity (I mean Track To constraint). I hope I don’t need to write a camera script for this.

Unity version: 3.4.2f3
Blender version: 2.61.0 r42615

Thanks for help.

I figured the problem is with the Track To constraint. It is not “applied” to the rotation curves. I manually entered the key frames in Unity in order to reproduce the exact same numbers (adjusting for the axis mismatch) from Blender and it was still wrong. Then I played with the influence property of the Track To constraint in Blender and discovered that it does not affect the curves in any way - it only affects the display. Now the question is - how to apply it? Or may be: what is the correct workflow in this case?..

The issue has been resolved. With Unity 3.5b6 now available for developer preview I decided to give its built-in animation tools another try. With Unity 3.4.2f3 every time when I record a camera animation it would generate some weird curves for rotation and when I played the animation back it would look quite different from what I expected. Instead of interpolating 2 adjacent rotations (in 2 adjacent key frames) using the shortest interpolation path - let’s say 30 degrees - it would (apparently) choose the longer path of 330 degrees and the object the camera is supposed to look at would not even be in the view for the most part of camera travelling between 2 key frames.

After trying to record an animation for a few days I gave up in frustration… Trying to tweak the curves in the animation window didn’t help. They would always be bent in some weird way. Changing between Euler Angles/Quaternions did not seem to make any difference (does it only help in case of Gimbal lock?). That’s why I switched to Blender.

So anyway now 3.5b6 does the interpolation correctly and the camera travels between key frames in a much more predictable way.