[ODE] Another question about contact joints

Rodrigo Hernandez kwizatz at aeongames.com
Mon Jan 2 13:57:55 MST 2006


No,

Supposing you are modifying or writting new collision functions for 2D 
shapes in collision_std.cpp, you must return 0 if no collision was found 
or the count of
contact joints you're returning on the contact array (up to the number 
on the lower 16 bits of the flags parameter), and of course, you must fill
the contact array with the information you found.

If you want a geom to be static, but still report contacts when other 
objects collide against it, you must create the geom as you normally would,
but create no body for it, so no nulls.

Cheers!

Guru2012 wrote:

> Thanks for the response last time. I've successfully implemented my 
> collision detection contact determination algorithms. I have, however, 
> another question.
> The dContact structure includes the dContactGeom structure, which has 
> two values, g1 and g2, supposedly dGeomIDs for the two colliding 
> geometry objects.
> My question is if those values can be set to NULL or 0. More 
> specifically, I am creating a contact joint with an immovable object, 
> so I'm leaving the contact joint's second body null, but in that case, 
> can I leave g2 null? In addition, can I simply leave both values in 
> the dContactGeom null?
>  
> -Andrew
>
>------------------------------------------------------------------------
>
>_______________________________________________
>ODE mailing list
>ODE at q12.org
>http://q12.org/mailman/listinfo/ode
>  
>



More information about the ODE mailing list