[ODE] conveyor belts and moving platforms

David McClurg dmcclurg at pandemicstudios.com.au
Thu Oct 10 23:36:02 2002


Benny Kramek wrote:
>> Also, if i want to simulate moving platforms (boxes with bodies) that the player can jump on, should friction keep the player on the platform or will I need a special contact joint?

> Friction will keep the players on the platform with no problem. Just make sure that there is enough friction.

I created a box geom with a body and dropped a sphere geom with a body on it.  There sphere comes to rest on the box while the box moves back and forth (on a sine wave with SetVel) underneath it.  But the sphere doesn't move back and forth with the box!!

Friction doesn't seem to give the sphere any motion.  I tried infinite and 1.0 friction with the same results.

      contacts[i].surface.mode = dContactBounce;
      contacts[i].surface.mu = 1.f; //dInfinity;
      contacts[i].surface.mu2 = 0.f;
      contacts[i].surface.bounce = 0.5f;
      contacts[i].surface.bounce_vel = 0.01f;

      dJointID c = dJointCreateContact(world, contactGroup, &contacts[i]);
      dJointAttach(c, b1Contact, b2Contact);

Any idea why this isn't working?