0

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!

  • I have no experience with box2D, but if I were you, I'd either experiment (what do you get for values near 0? above 1?) or just look at the documentation (does it tell you in terms of physics what you're setting? mu, or something else?) – MPeti Mar 28 '14 at 18:47

1 Answers1

0

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.

  • thanks justas. i set friction up to 2 and can climb higher slopes. the instability seems to have been to do with another motor i had on an armature on the body. i improved the servo code and it's much better now but I'd still like to know if libgdx friction=high school coefficient of friction. the maths is pretty easy so maybe i run some tests. – user3473715 Apr 01 '14 at 20:04
  • "libgdx friction" well its not libGDX's friction its box2d physics friction. Box2d is physics library used by libGDX but it wasn't created by libGDX community. And so considering that box2d follow real world physics principles it should correspond to high school coefficient of friction as you said. Keep in mind that in real life lets say a wheel touches the ground in quite a big area so friction force is quite big, and in box2d wheels touch ground only at one single point, hanse why you should use coefficient bigger than one to compensate for that. – Justas Sakalauskas Apr 01 '14 at 20:48
  • thanks I hadn't considered the deformation of real world wheels vs box2d point-like contacts. thanks also for pointing out my sloppy terminology I appreciate Box2D is external to Libgdx and will try and be more attentive to my terminology in future. – user3473715 Apr 04 '14 at 15:15