ODE

Blitz3D Forums/Blitz3D Userlibs/ODE

You can invent your own method, or you can force a pill shape to remain upright. It shouldn't produce bad results
if you code it right.