[ODE] Disabled geom bug in dxSimpleSpace::collide2() ?

Erwin de Vries erwin at vo.com
Tue Feb 24 00:33:36 MST 2004


> I've disabled a geom with dGeomDisable(), but it's still getting passed to
my collision callback.  So I traced into the code, and noticed the
following.  From dxSimpleSpace::collide2() :
>
>   // intersect bounding boxes
>   for (dxGeom *g=first; g; g=g->next) {
>     if (GEOM_ENABLED(g)){
>       collideAABBs (g,geom,data,callback);
>     }
>   }
>
> It's testing to see if g is enabled, but shouldn't it also test to see if
geom is enabled?  This is how my disabled geom appears to be slipping
through.  Or is there something I'm doing wrong?

This is not a bug but a feature. :-) A common use of disabled geoms is to
have the advantages of the spatial hierarchy (quadtree space), AND the
advantages of being able to do a single shot collision. If geom would be
checked as well one would have to enable it, call collide2() and disable it
again. An easier solution is for you to check geom yourself before calling
collide2(). I think this behavior is documented already?

Regards,
Erwin



More information about the ODE mailing list