Purely mechanical question about torques in human body Im trying to program an active ragdoll animation system for my game, and ive been stuck on this question for a while.
Lets imagine a body falling backwards as shown on the scheme below. My question is - purely mechanically, what prevents the butt muscle there from providing enough torque to make the body stand upright again? Or to even slow down the fall?

Im asking cause right now im applying the same constant amount of torque, to make my ragdoll stand upright. And when body starts to fall, this torque acts unnaturally, making it stand under forces that should destabilize it, or slow down the fall, when it actually gets destabilized.
 A: You have to connect the points of the rag doll as the tendons are like in a human body. This will allow the doll to be restricted only to fall or stand in a certain way. Knees don't bend sideways or backwards. Try rubber bands at different tensions to make it stand naturally.
A: Your question is "what prevents the butt muscle there from providing enough torque to make the body stand upright again?"
The answer is the limited traction from the ground. 

What you are trying to do (if you have a very heavy head) is move the center of mass over the legs, by keeping everything stiff and bending at the hip in the direction shown. The requirement for that to happen is the bodies (3), (2) and (1) above remain still and do not respond to the muscle torque. So you can argue that the forces to keep (3) in equilibrium come from (2) and the forces to keep (2) in equilibrium come from (1). But the forces to keep the foot on the ground (not sliding or lifting) come from the contact normal $N$ and more importantly the friction $F$ and reaction moment $M$ (our feet are flat and not single points for this reason).
The way things are connected creates a large system of equations which in planar form means three equations for each of the 4 bodies. That is 12 equations for the 3 degrees of freedom (joints at (1), (2) and (3)) and 9 constraint forces (forces and torques at each joint).
$$ \begin{aligned}
 \mathbf{F}_1 & = m_1 (\ddot{\mathbf{x}}_1 - \mathbf{g}) + \mathbf{F}_2 \\
 \mathbf{F}_2 & = m_2 (\ddot{\mathbf{x}}_2-\mathbf{g}) + \mathbf{F}_3 \\
 \mathbf{F}_3 & = m_3 (\ddot{\mathbf{x}}_3-\mathbf{g}) + \mathbf{F}_4 \\
 \mathbf{F}_4 & = m_4 (\ddot{\mathbf{x}}_4 -\mathbf{g}) \\
 {\tau}_1 +\mathbf{b}_1 \times \mathbf{F}_1 & = \mathrm{I}_1 \ddot{\theta}_1 + {\tau}_2 + \mathbf{n}_1 \times \mathbf{F}_2 \\
 {\tau}_2 + \mathbf{b}_2 \times \mathbf{F}_2 & = \mathrm{I}_2 \ddot{\theta}_2 + {\tau}_3 + \mathbf{n}_2\times \mathbf{F}_3\\
 {\tau}_3+\mathbf{b}_3 \times \mathbf{F}_3 & = \mathrm{I}_3 \ddot{\theta}_3 + {\tau}_4 + \mathbf{n}_4\times \mathbf{F}_4\\
 {\tau}_4+\mathbf{b}_4 \times \mathbf{F}_4 & = \mathrm{I}_4 \ddot{\theta}_4 \\
\end{aligned}$$
and your question being, how does the torque ${\tau}_4$ affect the combined center of mass acceleration
$$ \ddot{\mathbf{x}}_C = \frac{m_1 \ddot{\mathbf{x}}_1 + m_2 \ddot{\mathbf{x}}_2 + m_3 \ddot{\mathbf{x}}_3 + m_4 \ddot{\mathbf{x}}_4}{m_1+m_2+m_3+m_4} $$
I am unable to explain it in simpler terms, other than what makes the parts move to the right is external forces that act to the right, like the friction $F$ I drew above.
YouTube some videos of people getting up or righting themselves while wearing skis and you will notice the technique of stiffening the muscles  while trying to lean forwards. Now you will notice that without poles it is impossible to do so because the skis don't have enough traction.
