Ragdoll doodling
August 7th, 2009 by NetsuMy first ragdoll physics engine has gone pretty well. In half a day I was able to do the following simulation from scratch.
Disregard the crappy framerate, the screen capture utility is eating up a lot of computer resources.
Different parts of the body can have different mass and joints can have limited movement freedom. The only thing missing is angular friction, which I still don’t know how to implement in this particular case.
The code is in Python (with input and display being handled by Pygame) but it should be fairly easy to port it to any other language. Everything is class based, so adding different bodies and using the code in any game in need of ragdoll physics is almost a matter of copy-paste.


