Pay for Hesitation: Objects Sliding on Horizontal Floor (As if there is no friction)

Pages

2010年10月18日 星期一

Objects Sliding on Horizontal Floor (As if there is no friction)

http://www.box2d.org/forum/viewtopic.php?f=4&t=66
Right, there is no rolling friction in Box2D. I can certainly add this. I can also add linear/angular damping. I think I'll do the latter first. For now you can just multiply the linear/angular velocity by a number slightly less than 1 each time step (like 0.95). You can also generate some energy loss by reducing the friction. Then the circles will slide a bit more and slow down, instead of sticking and rolling.


I finally solved this problem by using b2Body.SetLinearDamping() 



沒有留言: