Stop circle from spinning from a slightest slope ?

My first post here, hope it's the correct forum

I have searched threads, posts, google - to no use. Thus new thread

I'm working on a physics game for iPhone (Box2d version from latest Cocos2d release) and hit a major wall unfortunately. The problem is simple but solution is not...

We need to be able to use circular bodies, but they don't want to behave properly. In real life if you have a surface and a ball on it - changing the slope of the surface by miniscule amount will not cause the ball to roll. In box2d unfortunately it does...

I tried to change friction (setting it to various amounts - .5f, 1 and even above), I tried setting angular damping, linear damping - nothing works

Ball will remain in it's place if it lies on a surface that has a perfect 0 angle (parallel to the ground). If the angle changes even a tiny bit - less than 1 per 128 pixels, it's not even visible on the screen - the circle will start spinning... Slowly but surely, and it eventually breaks the game

Can someone please recommend my some solution to this problem ? I am completely lost...

The only other thing I can think about is to use polygon shape instead of circle, but I really don't want to add shapes constructed out of large number of vertices

EDIT: I found this thread:
viewtopic.php?f=4&t=1646

but the solution from there (set fixed rotation to true) is not going to work for my game
Right, circles do not have rolling resistance. Circles in Box2D mimic a rigid metal coin that will roll at the smallest inclination in real life.

Your best bet for rolling resistance is to use a polygon.
Erin Catto wrote:
Right, circles do not have rolling resistance. Circles in Box2D mimic a rigid metal coin that will roll at the smallest inclination in real life.

Your best bet for rolling resistance is to use a polygon.


Ok... Not an answer I hoped for, but will stop me from wasting time trying to achieve the unachievable...

Can be closed, refactored the code and works now
You could implement a restriction on the circle by giving the circle a stickiness factor. On the update() if the vector length is less then "small amount" then set it to 0.

Just a N00b but a thought anyway

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