• Unity
  • Use different animations in different parts of same skeleton

Not sure how best to ask for what I’m looking for. I have one skeleton I’d like to use for a paper doll-style game where each of my character’s body parts can use a different animation, based on equipment, during an overall skeleton animation.
For example: if my character is running, I might want to define one run animation for the legs based on whether the character has heavy or light boots equipped, and one animation for the arms based on whether they have a light or heavy weapon equipped. When I tell my character to “run”, the different body parts should move according to what’s equipped to them, so I could have the light arms combined with heavy legs, or heavy arms and light legs, or heavy/heavy or light/light.

I could treat all the parts as separate skeletons, animate them totally independent of one another and specify particular clips to play for each animation for each equipment piece, but this use case seemed likely enough that I wanted to check if it was easily doable. I’ve seen a little about “mix and match” but can’t tell if that extends past changing sprites and into changing animations on a per-body-part basis.

Thanks!

Related Discussions
...
  • Bearbeitet

Most likely the best way to be able to combine separate upper- and lower body animations is to simply have separate animations for upper and lower body parts. So e.g. the following separate animations:
lower-run-heavyboots
lower-run-lightboots
upper-run-heavyarms
upper-run-lightarms

Then you can use separate animation tracks (or mecanim layers) for lower and upper body animation.

That makes sense to me. Would I then be using separate skeletons for each? Or is there some way to play multiple animations on the same skeleton at once?

Edit: I think I see. So I would be blending multiple animations and setting up the track in mecanim to decide which blend affected which part, and then each animation would simply be only affect the part of the skeleton associated with that body part?

slutze schrieb

That makes sense to me. Would I then be using separate skeletons for each? Or is there some way to play multiple animations on the same skeleton at once?

Of course there is! 🙂 You should use one skeleton and multiple tracks (or Mecanim animation layers):

  1. Track0 for lower body animations
    lower-run-heavyboots
    lower-run-lightboots
  2. Track1 for upper body animations
    upper-run-heavyarms
    upper-run-lightarms

And the lower body animations should only (or mainly) modify bones of the lower body, the upper body animations only those of the upper body.
Note that "mainly" here means that you could in fact add a little bit of upper body movement in the lower body animation (e.g. turn the chest slightly), blending could then overlay / add the upper body animations on top of the more subtle movements.