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
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