Contact Rolling Friction

Please don't post Bullet support questions here, use the above forums instead.
sukoy
Posts: 5
Joined: Wed Feb 20, 2008 2:58 pm

Contact Rolling Friction

Post by sukoy »

hi,

I have studied rigid body simulation from "Physically Based Modeling: Principles and Practice" by David Baraff and "Physics for Game Developers",but i have some problem.
I have implemented a right collision response with impulse,and this is the result http://www.youtube.com/watch?v=A6GDqO5BUYg.
As you can see after few times the balls going in to rolling without sliding so linear velocity = angular velocity (radius is one).
Now to stops the balls i have think to study the forces that acts on body when it 's in colliding contact,so if relative velocity along normal of collision plane is round zero and the accelleration torwards the body in plane,i resolve contact like this

Code: Select all

vContactForce = (body->fMass * (
			-data->vRelativeAcceleration *
			data->vCollisionNormal)) *
			data->vCollisionNormal;
vContactFriction = (vContactForce.Module() *
			0.1) *
			data->vCollisionTangent;
			
body->vForces += vContactForce;
body->vForces += vContactFriction;
body->vMoments +=data->vCollisionPoint^vContactForce;
body->vMoments +=data->vCollisionPoint^vContactFriction;
where

Code: Select all

vRelativeVelocity = body->vVelocity+(body->vAngularVelocity^vCollisionPoint);
vRelativeAccelleration = (body->vForces/body->fMass)+((body->vMoments/body->fInertia) ^ vCollisionPoint);
data->vCollisionTangent = -(vRelativeVelocity-((vRelativeVelocity*CollisionNormal)*CollisionNormal));
now what I expect is the linear and angular velocity decrease such that linear=angular,but this is not true.Instead what happens is my CollisionTangent sweeps between -1,0,0 and 1,0,0 in this way relative velocity never goes to zero and the ball never stops.

can you help me,please?

thx in advice

ps:the simulation is 2d