void Move_Apply_Physics(float dt) {
	  int i;

	  //Vector3f gravity=new Vector3f(0,0,-0.00980f*dt);
	  //body.pos+=gravity;

	  for(i=0;i<6;++i) {
	    Leg leg=legs[i];

	    //if(leg.pan_joint.pos  .z>0) leg.pan_joint  .pos += gravity;
	    //if(leg.knee_joint.pos .z>0) leg.knee_joint .pos += gravity;
	    //if(leg.ankle_joint.pos.z>0) leg.ankle_joint.pos += gravity;

	    // keep the joints "legal" (above z=0)
	    // @TODO: rewrite this code when the feet get pressure sensors.
	    if(leg.pan_joint  .pos.z<=0) leg.pan_joint .pos.z = 0;
	    if(leg.knee_joint .pos.z<=0) leg.knee_joint.pos.z = 0;
	    if(leg.ankle_joint.pos.z<=0) {
	      leg.ankle_joint.pos.z = 0;
	      leg.lpoc = leg.ankle_joint.pos;
	      leg.on_ground=true;
	    } else {
	      leg.on_ground=false;
	    }
	  }
	}