To prevent roll I use Wayne's example for angular friction
For ode.ODE_object=Each ODE_object If ode\body If dBodyIsEnabled(ode\body) numjoints=dBodyGetNumJoints(ode\body) If numjoints>0 ; If joined to another body For joints=0 To numjoints-1 ; for all joints attached to body... joint=dBodyGetJoint(ode\body,joints) If dJointGetType(joint)=dJointTypeContact ; If joint type is a collision contact ; Get Angular velocity vector bx#=dBodyGetAngularVelX#(ode\body) by#=dBodyGetAngularVelY#(ode\body) bz#=dBodyGetAngularVelZ#(ode\body) ; Calculate magnitudes ForceB#=Sqr(bx*bx+by*by+bz*bz) If forceb>.01 friction#=ode\mat\rotational_friction*-1.0 dBodyAddTorque ode\body,dBodyGetAngularVelX(ode\body)*friction,dBodyGetAngularVelY(ode\body)*friction,dBodyGetAngularVelZ(ode\body)*friction End If End If Next EndIf EndIf EndIf Next