Easy way to set initial revolute joint angle?

Hello, first off: Thank you so much for this great 2d physics engine! It's so easy to use that even I can use it (which says a lot, lol)!

On to the questions... (sorry for the long post)

1. As I started to create my little ragdoll class and its associated graphics class I ran into a little problem I'm having a hard time solving. The ragdoll class works great and the bodies (the actual ragdolls) move around really neat in the world. However, it just felt natural to me that characters that were alive would not be part of the physics to the same extent as the ragdolls, due to animation, until they were actually dead. I've got a method to create a ragdoll from a "live character" and move the ragdoll to that position, however I don't know how to make the limbs (joints) have the same angle as the corresponding live body. I know that I could place the body parts and joints in the correct rotations and positions accordingly but that requires a lot of thinking and coding (and math, sigh) - I just want to know if there's a less complicated way to go about this.

I've been thinking of setting the limit of the joint temporarily to the desired angle and setting a high speed and torque towards that angle and updating just once, but I don't know how to set the limits back to normal when they're actual joints in the world.

2. Simple question, just to make sure, the group index has a limit of +/- ~32767? I mean, the variable type is int16... so I thought it would but I don't know exactly how group index is handled within box2d (besides what is written in the manual).

Thank you beforehand.
How does the construction of your "live" bodies differ from the "dead" ragdolls?
At the moment I tell the ragdoll class to generate a body depending on some given height. I then use the body-, joint- and boxdefs generated as reference when constructing the living body parts and joints (not box2d-classes). I thought this would help to keep a close tie between the proportions of the ragdoll and the living doll. Once that is done the living doll may move around and change the angles of its joints and so forth... however, as previously mentioned, it's the transition back that's haunting me. I haven't implemented the living body completely yet though - still working out the math and playing around with the ragdolls 😀
For ragdolls in 1.4.3 you need to build the ragdoll in the reference pose for the character so that the joint limits come out right. Then adjust the position and rotation of the ragdoll bones to match the rotation of your character's bones. You may also want to use the velocity from the animation to set the initial velocity of the ragdoll bones.

Yeah, you have to understand the math for all this. Once you go through this process once, it will become easier.

Original thread: https://box2d.org/forum/viewtopic.php?t=302