Search code examples
libgdxbox2dmu

Libgdx Box2d friction - can't climb shallow slope - is friction like high-school mu?


firstly, is bod2d friction like mu in high-school physics?

I have a compound body with two wheels on revolute joints one of which has a motor. When I try to drive it up an 30 degree slope my driven wheel spins and i don't get up. I have set friction on all bodies as 0.9. If I remember my high school physics mu approx 1 should let me climb a slope of nearly 45 degrees but my wheels slip.

secondly as I increase friction towards 1 my model becomes increasingly unstable. i have some angular damping set but climbing the ramp the physics sometimes seems to enter some kind of positive feedback condition and the moving vehicle disappears up at a silly velocity, Anyone seen anything like this?

thanks!


Solution

  • In my game I solved the low friction of wheels by setting the friction at way more than 1. So you should try that. Not sure about that instability that you are describing.