[ODE] Sliding box on plane Question

Bob Cober bobcober at mac.com
Sun Nov 11 07:14:35 MST 2007

I am learning ODE.

I have built a simple app that drops boxes and spheres, similar to the boxstack demo.

Everything works, except that the boxes slowly slide off the plane.  i.e. They tumble and roll accurately, but instead of resting in place they slowly slide off the plane in the direction they had been rolling.

I thought there might be no friction to hold them, but I generate the contact point with(smilar to boxstack):

  for(i=0; i < MAX_CONTACTS; i++)
	contact[i].surface.mode = dContactBounce || dContactSoftCFM;
	contact[i].surface.mu = dInfinity;
	contact[i].surface.mu2 = 0;
	contact[i].surface.bounce = 0.1;
	contact[i].surface.bounce_vel = 0.1;
	contact[i].surface.soft_cfm = 0.01;
  if(int numc = dCollide(o1,o2,MAX_CONTACTS, &contact[0].geom, sizeof(dContact)))
	for (i=0; i<numc; i++ )
	    dJointID c = dJointCreateContact(world,contactgroup, contact);
	    dJointAttach(c, b1, b2);

Thanks in advance for any advice

More information about the ODE mailing list