cocos2d + box2d Pool game friction issues

When creating a pool game for iOS I use box2d an so far it feels pretty realistic.

The problem is that the balls do not stop quickly enough after a shot, it almost looks like the "glide". So it takes way too long for the next turn.

I tried to change the friction but it does not change anything.

Here are my settings:

Code: Select all

b2CircleShape circle;
circle.m_radius = radius / PTM_RATIO;
b2FixtureDef ballShapeDef;
ballShapeDef.shape = &circle;
ballShapeDef.density = 20.00f;
ballShapeDef.friction = 0.3f;
ballShapeDef.restitution = 1.0f;


What to do here? Any suggestions?
Maybe you could apply a small force in the opposite direction of movement.

Code: Select all

b2Vec2 velDir = body->GetLinearVelocity();
float speed = velDir.Normalize();
float dragForce = speed * xxx; // some small number
dragForce = b2Min( dragForce, yyy ); // a maximum drag limit
body->ApplyForce( dragForce * -velDir, body->GetWorldCenter() );

Original thread: https://box2d.org/forum/viewtopic.php?t=9063