3

I made a ragdoll similar to the one in this demo. This rag doll will be used for a turn based rpg game where the physics will be used for animations such as character taking damage, dying, falling down, etc.

What I am pondering at the moment is as how should go about this, should I stick the rag doll by the head to the background (leaving the body dangling) and basically throw around its body parts around as to simulate punching etc (as shown in Fig 1), or stiffen the joints and statically rotate and move the body parts for the actions taken(as shown in Fig 2), and when it comes to the character dying(or a similar action) just loosen the joints and let the rag doll fall down. Or is there a better way to go about doing this?

I am new to farseer physics and don't even know if what I mentioned is even possible or overwhelmingly hard to do.

Illustration http://img3.imageshack.us/img3/8681/charactermovementrg5.jpg

Please note that the red line in the figures represents the character's arm

GEOCHET
  • 21,119
  • 15
  • 74
  • 98
Drahcir
  • 12,311
  • 19
  • 63
  • 76

4 Answers4

1

Not sure that ragdolls are the way to go here, if you want animations. But if you do want to use them, I'd lock the feet to the floor and have some rotation springs in the joints so that when no forces are applied, the body stands upright. Then if it gets a hit, it'll kind of bend over, but should rebound to it's stand-up state afterwards (you may have to help it along the way back, e.g. apply some forces/torques until it's back where you want it).

For animations, such as the character punching, you could perhaps apply a spring joint (I think that's the name). Connect it to the fist and the destination, and the arm should automatically move there. You could do the same with a kick, just release the lock on that foot. However, I think it might be hard to get it to look right. On the other hand, it would look unique to other games, even though it might look kinda funny.

If you're skilled, you might wanna create an animation editor and save an animation as a sequence of forces and torques that need to be applied to limbs in order to get them to where and when they should be.

Srekel
  • 2,183
  • 3
  • 21
  • 26
0

For sure animated sprites are the best, and painless, way of doing this.

rcdmk
  • 1
0

I think a better approach is to have an animated sprite played, rather than going through joint manipulation .

0

Maybe you can use some RotateTransform implementations to articulate arms and legs.

G. Ghez
  • 3,429
  • 2
  • 21
  • 18