[ODE] High density sphere passes into plane?
Anna-Beth Fox
anna_beth_fox at yahoo.com.au
Mon Aug 7 15:37:12 MST 2006
Hello again all,
I have setup a simple ODE test bed for experiments and the like and when I create a plane (for the floor/ground representation) and a sphere, the sphere "sinks" into the plane under gravity. For example:
...
dMass m;
my_world = dWorldCreate();
my_space = dHashSpaceCreate(NULL);
contact_group = dJointGroupCreate(0);
dWorldSetGravity(my_world, 0.0f, -9.81f, 0.0f);
dWorldSetCFM(my_world, 0.0001f);
dWorldSetContactMaxCorrectingVel(my_world, 0.1f);
dWorldSetContactSurfaceLayer(my_world, 0.0001f);
dCreatePlane(my_space, 0.0f, 1.0f, 0.0f, 0.0f); // Floor
the_ball.body = dBodyCreate(my_world);
the_ball.geom = dCreateSphere(my_space, 0.5f);
dGeomSetBody(the_ball.geom, the_ball.body);
dMassSetZero(&m);
dMassSetSphere(&m, 5.0f, 0.5f); // Really any density greater than 2.0!!!
dBodySetMass(the_ball.body, &m);
What's the issue here? What am I missing or stuffed up? And how do I set the mass of the sphere to be like 21Kg.
TIA peeps.
Anna-Beth
Send instant messages to your online friends http://au.messenger.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://q12.org/pipermail/ode/attachments/20060808/67a90bca/attachment.htm
More information about the ODE
mailing list