3
\$\begingroup\$

I have a character composed of several sprites (legs, torso, head, arms). The character has the ability to pick up weapons, which are of varied types.

Each type of weapon has its own animation (sprite sheet). Ideally I want the weapons not only to animate themselves, but also affect how the player is animated (e.g. lean back when swinging sword).

Here's how I'm thinking of setting it up right now:

Player has an animator controller with states for Walking, Attacking, Idle, Flinching and this controls all the body parts.

Main questions: - How can I incorporate jumping in this? - How can the weapon animations have control over the rest of the body?

For having different weapons I am thinking of adding different states per weapon type, but I don't think that's a great way, especially when I start adding combos.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ AFAIK, you have to compose the sprites together (as children) in the animation editor and flatten the motion curves so each part "pops" into place on each frame, and the same goes for relevant hit boxes. If someone knows a better way I'd really like to see it. \$\endgroup\$
    – jzx
    Jul 18, 2014 at 17:14

1 Answer 1

1
\$\begingroup\$

Your approach is inverse of what I would do. Weapons don't control the character, it's the other way around. So I suggest setup animations on character to jump normally as it has a weapon in hand. If you have several weapon types (light, heavy, custom...) you can setup animation for each one of them, it would probably just affect how hands are holding the weapon and maybe core body posture. In character then, when you jump, you start proper animation for type of weapon you are holding.

In general, I think this is a good approach but if every weapon requires custom animation for the character (hard to imagine) you might be better of with reversing the responsibility and linking animation to weapon instead of character. I wouldn't worry about combos, make your animations simple and combos would be just 2 or more animations blending into one at runtime.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .