[ODE] problem with 3 contact joints

Nate W coding at natew.com
Fri Jun 14 12:35:02 2002


On Fri, 14 Jun 2002, Jacob Van Wingen wrote:

> my dSpaceCollide callback seems to allow for more enough collision points.

My guess, based on the behavior you've described, is that not all of those
collision points are being processed correctly (read as: contact joints
aren't being created properly for all of the collisions).

Have you tried setting a breakpoint on dJointCreateContact and manually
inspecting all of the parameters to that (and to dJointAttach) to make
sure they're all reasonable?

Since it behaves properly most of the time, you could try doing something
like this inside your contact-processing loop:

	int iCount = dCollide (o1, o2, iMaxContacts, &contact[0].geom, sizeof (dContact));
	if (iCount)
	{
		for (int iContact = 0; iContact < iMax; iContact++)
		{
			if (iContact > 0)
				Breakpoint ();

Where "Breakpoint()" is a platform-specific function that causes the
debugger to break.  In Win32, it's DebugBreak ();  That way your app
should run freely until you get into the multiple-contact situation.  And
if that breakpoint never gets hit, that tells you something too.

--

Nate Waddoups
Redmond WA USA
http://www.natew.com