[ODE] Static objects start rotating?

James Frye fryeja at us.ibm.com
Fri Aug 10 14:45:11 MST 2007


I'm sure this must be a really dumb question, but I can't find an answer.
(Apropos of which, it would
be nice if there was some way to search the mailing list archives...)

I create a very simple simulation, just a box sitting on the ground (Obj is
a struct that holds all
info about a body...)

  Obj->body = dBodyCreate (world);
  dBodySetPosition (Obj->body, 0.5, 2.0, 0.25);

  dMassSetBox (&m, 1.0, 0.5, 2.0, 0.5);
  dBodySetMass (Obj->body, &m);

  Obj->geom = dCreateBox (space, 0.5, 2.0, 0.5);
  dGeomSetBody (Obj->geoms, Obj->body);

I run this with a basic simulation loop as copied from the examples.  The box should just sit there
doing nothing, but it begins a slow rotation around the Z axis.  Why?  What am I doing wrong?

Thanks,
James



More information about the ODE mailing list