0

Situation

I'm making a billiards simulator and have a static btBox representing the table surface with btSphere's as the balls. In the demo, both the ground (table surface) and the btSphere's are given positive values for rolling friction, 1.0 and 0.3 respectively. The demo show's the sphere's roll naturally and eventually come to rest.

When I use these values in my simulation the sphere's can never maintain an angular velocity and just "skid" across the table - no matter what values I set rolling friction in the surface/sphere.

If I set rolling friction to zero for the surface (doesn't matter which) then it produces a realistic rolling behavior UNTIL the ball is about to come to rest. Then it somehow acquires this constant, slow velocity and rolls like a zombie around the table. Also ball's will just start rolling sometimes, before any contact.

Considerations

I have tried many combinations of friction/dampening and can't reproduce the demo's behavior or fix the problems I mention. The only important differences in my setup that I can think of is mine is MUCH smaller. It's not simple explaining why these are so small but my BALL_RADIUS = 0.0103 and BALL_MASS = 0.12393.

Question(s)

Any idea's why my ball's aren't spinning when I have rolling friction on both the surface and the sphere?

Otherwise, any idea's what's keeping the balls from stopping when I'm only setting rolling friction on the sphere?

Thoughts

The docs/demo/code/web do NOT do a very good job at documenting rolling friction. Either that or I'm doing something extremely strange...Please help!

tkefauver
  • 491
  • 5
  • 19
  • Check that you are correctly translating the rotations from the btMotionState to your graphics - The problem may not be bullet. – Martin Wickham Apr 07 '14 at 18:54

1 Answers1

2

I think the problem is with your units, though there may be further issues. First of all, Bullet works best when using units between 0.05 and 10 (http://www.bulletphysics.org/mediawiki-1.5.8/index.php/Scaling_The_World)

Second, if you use a ball with radius 0.01 made of a heavy solid material like marble, the mass should be around 2.85 (http://www.convert-me.com/en/convert/weight2volume/)

thisisdog
  • 908
  • 1
  • 5
  • 13
  • Yes I agree, bad units seems logical and is literally the ONLY difference between the setup I have and what the demo's doing. I tried using the values you suggested however but have no change in behavior whatsoever. The real bug must be a side-effect of some detail I'm not seeing even though I've poured over the code. I have a hack in place that looks reasonably realistic so its not a total loss but if I ever figure out what's wrong I'll be sure to explain on here. – tkefauver Feb 17 '14 at 02:05