[ODE] Add body to geom = no more collision

Chris M. czb182 at hotmail.com
Wed Jul 26 22:39:29 MST 2006


Im trying to do some trivial work with ODE and not getting the results I 
expect.  I created a simple
box using dCreateBox then use dGeomSetPosition to move it.  I am getting a 
collision then, and the box does not move at all, which is expected.  Now I 
want the box to move when hit, so I made some changes.
heres what I call.
dBodyCreate ();
dBodySetPosition ();
dMassSetBox ();
dMassAdjust ();
dBodySetMass ();
dCreateBox();
dGeomSetBody ();
dBodyEnable();

Now, below this I create another box and four wheels for a car, which I 
mainly copied from the samples.  The only difference between this box and 
the car is that the car is made of several objects with joints, while the 
box is standalone.  I put a print in my collision callback checking when two 
boxs are colliding.  When the box is just a geom It get prints and see the 
car stop moving.  When I add the body, no more prints and no box to box 
collision.  What makes this different.  I use dBodySetPosition instead of 
dGeomSetPosition, but they have same values.  Why is there no colliion when 
adding body?




More information about the ODE mailing list