- Home /
Mecanim: different animations for a node
Hi everybody. I'm trying to use the same animator state machine for all the different characters of my game. There's the single problem that I want each to have a different version of some animations (idle, run and jump). I made a sub-state machine, with an empty node that then selects the animation depending on the character, but as you can guess, the animation blending is lost. Have any of you done something similar? If so, did you find a workaround?
If you want to have different versions of the animations for each Character, why do you only want one Animator? What's to stop you creating one that works with the 3 animations for your first character and simply then duplicating the animator (+rena$$anonymous$$g) and changing the settings for the animations in the new animator each time?
Answer by thraxST · Jun 10, 2013 at 03:04 PM
I would probably copy the animators like the previous poster said, but another option would be to use a blend tree.
If there were three characters you could set up the blend tree with the three different animations and then have it blend using a character parameter that is a float 0-2 and then set the float based on which character it is. And then on initialization set the character to parameter accordingly. 0 for the first character, 1 for the second and 2 for the third.
This! I was actually experimenting with this a bit already, and was a bit doubtful about it, but then I discovered that I can in fact use nested blend trees. Certainly I think that's the way to do it. Thanks!
Your answer
Follow this Question
Related Questions
Mecanim and additive animation blending 2 Answers
Mecanim layers blending 0 Answers
Mecanim : reference state machine animation 0 Answers
Animation not blending properly 1 Answer