[ODE] Masses and collisions
Malcolm Ryan
malcolmr at cse.unsw.edu.au
Mon Apr 30 22:26:20 MST 2007
Hi,
I'm a new user of ODE, working with the PyODE interface in order to
build games with PyGame. I've written a test program (attached) but
it doesn't seem to work right. Basically, it involves two objects (a
box and a sphere) dropping onto a floor (a plane). When they collide
with the floor, they are supposed to stop.
It all works fine, until I give the objects mass. Once I add the
following lines:
M = ode.Mass()
M.setSphere(10, self.radius)
self.body.setMass(M)
The Circle object starts to significantly penetrate the floor, and
bounce a lot. It eventually comes to rest half-embedded in the floor.
If I reduce the density from 10 to 1, the problem is significantly
reduced, but still there is a lot of bouncing before the objects come
to rest on the surface.
Can anyone explain what is going on here?
Thanks,
Malcolm
--
"Cleanliness is not next to godliness nowadays,
for cleanliness is made an essential
and godliness is regarded as an offence.
- G.K.Chesterton, On Lying in Bed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: physics_test.py
Type: text/x-python-script
Size: 4577 bytes
Desc: not available
Url : http://ode.org/pipermail/ode/attachments/20070501/bc6aa5f2/physics_test.bin
-------------- next part --------------
More information about the ODE
mailing list