[ODE] Pool table physics

James Myers espmiii at yahoo.com
Fri Nov 8 10:26:03 2002


Hello all, new user here...
Is ODE appropriate for simulating a game of pool?
I ask because I'm either modifying the wrong
parameters or barking up the wrong library.
There are two big problems I'm having:
The first problem is that the balls are not "rolling".
 The friction from the table should put torque on the
ball and cause angular acceleration until the ball
reaches natural rolling.  The balls orientation as
returned by dBodyGetRotation doesn't reflect this. 
Eventually the balls' orientation does change a
little, but only after a lot of playing.  I'm using
dBodyAddForce, so there shouldn't be any english
applied to the cue ball.
The second problem is that as the balls start to slow
down, they will not travel in a straight line.  This
is hard to describe but if I apply a small force at
about a 35 degree angle around the y axis parallel to
the xz plane, the cue ball will travel straight for a
bit, then start to curve in the +x direction, then
roll straight along +x until it stops.  The same
happens if I hit on an angle closer to + or - z, it
will start to head along that axis.  It also happens
on say, a break shot, where all the balls will
eventually be traveling in + or - x or z near the end
of the shot.
I'm guessing there's just something wrong with my
surface parameters.  I am only using the
dContactBounce flag and changing the mu and bounce
parameters based on the type of collision
(bumper-ball, ball-floor, ball-ball).  I'm not a real
physics genius, which is why I switched to ODE in the
first place.
I am using my own collision functions right now,
perhaps there should be more than a single contact
joint where the ball meets the table?  They tend to
jitter a bit every 50 frames (which is about 200 world
ticks).  Maybe that's due to using the double
precision ode and performing my collision detection
with single precision?  It does happen in both the
0.03 release and whatever was in cvs wednesday
afternoon.
Any advice would be appreciated greatly.  Is more
information needed?
Thanks much,
James

__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2