SOLVED:Maya translat animation does not move transform coord

Hi guys

I’ve just got a Maya animation into Unity, which was done externally. The animation in Maya moves the person, ie, as the animation goes the x z coordinates of the person moves.

Now, when I import that into Unity, and print out the transform coordinates as the animation plays, the coordinates of the transform dont change, even though the person is moving.

Im guessing I’m missing something. I hoped that the translation that occurs in Maya when the person moves would be taken over to move the transform in Unity. Is this not the case? Is there anything I can do to make it the case?

If not, whats the best way to deal with this? eg, if I animate a translation in Maya, how do I get a Unity camera to follow the translation?

Hope thats clear! Thanks for your help!

Greg

Hello!

you are not missing anything.

Animations are different from movements, so if you play a “walk” animation, you have to move your object as well :stuck_out_tongue:

hope it helps :wink:

Hi Juan

Thanks for the reply. Thats sort of what I was… afraid of?

So I have a martial arts animation that I am playing back in Unity. Kind of like a 3d video, that the user can zoom in and around, which involves the character translating in the x,z planes.

So I would like the camera to follow the character.

Given that the tranlation is in the animation, what do you recommend? How would this work in Unity? Im a bit stuck, and can only think of dodgy hacks to work around it!

Thanks!

Hello :slight_smile:

You can try using Smooth Follow from the scripts of the Standard assets.

that should make your camera follow your characters or given transform :slight_smile:

hope it helps :wink:

Hi Juan

Yes, I have sorted out the camera, but the camera looks at the transform. The animation moves, but the camera is looking at the original location of the transform.

So, if the transform is positioned at 0,0. The animation then moves it to 10,0, but the camera is still looking at 0,0. Does that make sense?

Thanks heaps for your help!

Try parenting an empty game object to the skeleton of the character, where you want the camera to look.

Set the new empty game object as the transform for the smooth follow cam target.

Hi guys,
thanks for the help, Mikes suggestion worked perfectly!

cheers
Greg