[ODE] Problem in my nearCallback?

Michael Powers popomatix at yahoo.com
Tue Dec 31 04:51:02 2002


I have just started integrating ODE in with my engine
- I have the Body side of things working - but when I
turn on the Collision everything goes to hell -
instead of my blocks falling nicely they suddenly fly
100 times faster downward - what could be causing
this? The only additional code in the nearCallback
that gets called - here is what I have ...

  dBodyID b1 = dGeomGetBody(o1);
  dBodyID b2 = dGeomGetBody(o2);
  if (b1 && b2 && dAreConnectedExcluding
(b1,b2,dJointTypeContact)) return;

  dContact contact;
  contact.surface.mode = 0;
  contact.surface.mu = dInfinity;
  if (dCollide
(o1,o2,0,&contact.geom,sizeof(dContactGeom))) {
    dJointID c = dJointCreateContact
(world_ptr->world_id,world_ptr->contactgroup,&contact);
    dJointAttach (c,b1,b2);
  }

I also tried the nearCallback from the buggy demo and
one of the other test demos - they all show really
bizzare behavior - one causes the blocks to fly
sideways.

I am using the latest CVS tree - is that stable or am
I asking for trouble (should I go to .03?)

Another related question - I cannot for the life of me
figure out how to add a ground plane - what does the d
value mean and what are a,b,c - i imagine that a,b,c
say which way the plane points and d says what the
position of it is? Anyway, I ended up using a large
box for the ground because I could not figure out
planes.. In the above example though I took out the
ground box so that is not causing a problem.

Thanks for any help!
Michael

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com