Hi again everyone,
After testing around with Link Constraint I found it wasn´t working in Unity.
I found somewhere that FBX dosent suport that, also found some turn arounds using Animation Events. But that would require us to do alot of in engine tweaks to make everything work. (Unity dosen´t let you edit the FBX animation directly)
What I need; make the character drop the weapon on the floor or change hands during combat.
My question is, What would be a elegant/smart way to solve that?
What I have in mind; Im thinking of printing that somewhere in the FBX as ASCII, and duplicate the animation clip in Unity and Create Events to handle that. (im not completly happy with that approach).
Thanks in Advanced and any help is welcome.
Couldn’t you export the weapon as its own prefab and maintain its animations. Then just have the weapon change states, right hand state (play this anim), left hand state(play this anim), dropped state(Play this anim)? I would imagine this could give you more flexibility with weapons, such as upgrading etc… Just my thoughts I could be wrong.
i haven´t try that, but i think unity create some internal optimizations to animations curves. without parenting, they might have some undesired animation artifacts (like the blade dancing in the players hand).
We dont export the weapon its self at character hands. We use dummys as attach points and in Game we load the model and make it child of that Dummy. Doing the same for helm, shield and stuff.
We can change that parenting during gameplay, but figure out “when”, is the problem.
One of the animatiors here made it work with position constrain weight and rotation with one more dummy parent to each other… it is kinda complex and still have some undesire effects. but its the closer we got so far.
Some where on this forum there was a post about constraints from Maya and getting them across into Unity using Python, if I am not mistaken. You may want to search for that post. I wish I could remember who posted it.
What kind of undesired effects are you getting when you use position and orient constraints?
[QUOTE=redcrab;11927]We can change that parenting during gameplay, but figure out “when”, is the problem.[/QUOTE]
I’ve never worked with Unity, but I think figuring it out how to export the “when” to switch parents of an object might be easier than figuring out how to export constraints from either Maya or Max to a real time engine.
You could either manually add that information to an external txt file (.ini, .xml, .cvs, .whatever), with something like:
frameNumber;currentParent
So it would end with 0;rightHand until at frame 231;leftHand so it would switch parent. Or write some sort of tool for your animator to create that text file from inside Maya/Max, depending on your budgets/time constraints.