Hello! I have a fighting game with a prefab of a character instantiated twice, one for each opponent, so I can make my tests.
For the animations, I have a unique AnimationController for my two characters. In addition of standard animation states (Idle, Walk, Jump, etc.), I have a another state, for the special hits, and each time a special hit is triggered by the player, I attach its corresponding AnimationClip to the state, via a script. This avoids me to create a state for every special hits of every characters I will create in the future.
So if Player 1 triggers for instance a Hadouken, the Hadouken AnimationClip is associated to the Special Hit state, and then the animation is launched via a trigger variable. If now Player 2 triggers a Shoryuken, I put the Shoryuken AnimationClip in the same Special Hit state, and again launch the animation.
My problem is obvious: if Player 1 AND Player 2 trigger two different hit at the same time, I can’t put two AnimationClips in the same state. My solution would be to create two clones of my AnimationController at the starting of the game, and use these ersatz instead, but I don’t know how to do that. Any idea please? Or maybe I’m using a wrong method with my unique animation state?
Thanks !