Hi there,
I have a game in which my main actor is a ball. My problem is that I'd like the ball to slow down and come to rest when it is rolling. It seems that circles roll frictionlessly in box2d. I thought Angular Damping would help but it doesnt seem to bring the ball to rest.
this post is close but not quite:
http://www.cocos2d-iphone.org/forum/topic/3900
to bring the ball to rest I think i need to be able to sum all the forces on the ball, and if the resultant force is less than some threshold, just set the ball to sleep. Is there a semi-straightforward way for me to do this?
This post is on getting the resultant force on a body
http://www.box2d.org/forum/viewtopic.php?f=3&t=5350
but he never got a good answer.
Is a contact listener and summing the contact impulses along with gravity the best way for me to do this?
Thanks!
I have a game in which my main actor is a ball. My problem is that I'd like the ball to slow down and come to rest when it is rolling. It seems that circles roll frictionlessly in box2d. I thought Angular Damping would help but it doesnt seem to bring the ball to rest.
this post is close but not quite:
http://www.cocos2d-iphone.org/forum/topic/3900
to bring the ball to rest I think i need to be able to sum all the forces on the ball, and if the resultant force is less than some threshold, just set the ball to sleep. Is there a semi-straightforward way for me to do this?
This post is on getting the resultant force on a body
http://www.box2d.org/forum/viewtopic.php?f=3&t=5350
but he never got a good answer.
Is a contact listener and summing the contact impulses along with gravity the best way for me to do this?
Thanks!