I have a character that can carry a single-handed weapon, a two-handed weapon or no weapons at all (weapon hold type int parameter) with a boolean if aiming or weapon down. He can remain idle, he can walk (blend tree from x-y float parameters). Also, as the enemy approaches he can crouch-idle as in if in alert, or as he approaches the enemy he can crouch-walk (boolean parameter).

I can think of 3 ways of handling these variations in postures:

One layer per each weapon variation: a layer for "two-handed weapon" and one for "single-hand weapon". In each of them, there would be an "idle" state for a normal idle animation, one state for "idle crouch", one state for "walk" for normal walking animation, one state for "walk crouch" for alert mode, etc. A "crouch" boolean parameter would tell whether to idle/walk standing upright or not.

the other way would be to have one single layer, and handle all variations with several boolean parameters: "walk", "crouch", "one-handed", "two-handed". Example: If "walk" is false, "crouch" is true and "single-handed" is true, the character would remain still, in a crouch position, with only one hand carrying the weapon.

Another way could be to have one layer per animation type (one for the different idles, one for the different walks, etc.) and switch the layer weight depending on the character's animation to play.

Which of the three (or any other possibility?) do you think scales best when more animations (or parameters) are added to the state machine? Or to rephrase it better: what is the best way to organize the animator given three (or more) parameters?

For example, I may want to add another boolean if is shooting or not (for recoil) and I can already see the spaghetti mess in the animator... SO I think there must be a better way to organize all of this.


  • \$\begingroup\$ Are you asking for opinions or help? If it is opinions you are looking for, you have came to the wrong place. The Q and A section of this site is not meant for opinionated post. \$\endgroup\$ – The Mattbat999 May 21 '18 at 2:54
  • \$\begingroup\$ Ah, you're right, I got my question phrased wrong. Edited it :) \$\endgroup\$ – takada yoshiro May 21 '18 at 3:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.