There is one thing called a "stay upright constraint" which applies torque to the body if it's tilting. That is, just like most springs are used to push or pull an object it can also be used to turn an object instead.
The cool thing is that based on the springstiffness and damping you could make the character sway if hit by something.
I don't know specifically how to set one up but google for springs and you should be able to figure it out. Gaffer mentions it somewhere in this tutorial... http://69.55.229.29/articles/Springs.html
|