Quick question about character torso/legs

Hello there. I have a quick question about characters. I have a simple humanoid character (Unity Asset Store - The Best Assets for Game Making) just to prototype the game. I’m trying to simulate a two-sticks shooter, but I’m using keyboard and mouse at the moment. What I’ll end up with is something akin to Angry Bots demo.

On the angry-bots demo the player legs move on the 4 directions, while the torso rotates with the mouse - what is necessary to rotate them?

I’ve tried to rotate just the torso (the Spine part of the character), but it wouldn’t move. I thought it was something about the hierarchy - the torso is under “hips”, with the legs. I’ve tried to move one level up - then his torso fell on the ground :frowning: It did rotate, tho :slight_smile:

My question is not about what I must do, but what exactly can I read or study to understand the hierarchy of an object, how to move/animate parts of it, and how to “organize” it?

Cheers, and thanks!

André

It depends on what animation system you’re using – Mecanim or Legacy.

In either system, there are at least two approaches: blending or procedural (IK).

  • Mecanim + Blending: Get animations of the character rotating his torso in two directions (extreme left and extreme right) or four directions (extreme upper left, lower left, upper right, lower right) and put them in a blend tree. Then set the blend parameter according to where he should be looking.
  • Mecanim + IK: Use Mecanim’s SetLookAtPosition (Pro only) or Final IK (or write your own IK).
  • Legacy + Blending: See the Legacy Animation Scripting page for blending, or check out SAGE (basically Mecanim for Legacy).
  • Legacy + IK: Look at the IK in Rune’s free Locomotion System for a model
1 Like

Thanks a lot TonyLi! I’ll read all of it tonight!

Thanks a lot!!!