[ODE] Number of Contacts

Henri Hakl henri at cs.sun.ac.za
Wed Jun 11 16:43:02 2003


That depends pretty much on how accurate you want to make things - but more
directly - it also depends on what kind of object we're talking about. A
sphere just needs one contact to correct collide with the ground.

I'm not really informed otherwise, but I read that 3 is a pretty popular
number. Might be off though.
  Henri


----- Original Message -----
From: "DjArcas" <djarcas@hotmail.com>
To: <ode@q12.org>
Sent: Thursday, June 12, 2003 1:14 AM
Subject: [ODE] Number of Contacts


> const int N = 2;
>
> dContact contact[N];
>
> //Attached objects can't collide
>
> b1 = dGeomGetBody(o1);
>
> b2 = dGeomGetBody(o2);
>
> if (b1 && b2 && dAreConnected (b1,b2))
>
> {
>
> return;
>
> }
>
> if (!o1) return;
>
> if (!o2) return;
>
> lNumCollisions = dCollide (o1,o2,N,&contact[0].geom,sizeof(dContact));
>
>
>
> I've just tracked down an odd error here - if I have N at 1 contact, then
> objects bounce off eachother faster than they hit. If I increase it to 2
(or
> 10), all works happily.
>
>
>
> Am I right in thinking that more contacts = 'better' physics, but slower?
> What's the ideal number to use?
>
>
>
> Adam
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode