[ODE] Joints between static environment and itself?

Jon Watte (ODE) hplus-ode at mindcontrol.org
Wed Nov 29 13:55:44 MST 2006

You should solve the problem higher up. You should not collide objects 
that are both static between each other. That way, the question of 
contact joints will never come up.

Category/collider bits are great for fixing this.


          / h+

ChrisC wrote:
> I have a trimesh terrain, and some large objects (eg.
> a house) the bodies of which are both in the static
> environment (body id = 0). I noticed that when I
> embedded a large object in the terrain, the world step
> calculation time became huge - the more terrain the
> house intersected with, the slower it got. I traced
> the problem to the code I was using to make contact
> joints between colliding bodies, I think this code is
> pretty typical if you look at the test programs:
> (in nearCallback, b1 and b2 are body ids)
> if (b1 && b2 && dAreConnectedExcluding
> (b1,b2,dJointTypeContact)) return;
> This will make a contact joint between two bodies even
> if they are of the same body id. Looking further into
> dJointAttach I found that as you would expect, this is
> not actually the case, and there is an assert to make
> sure you don't add a joint between a body and itself:
> dUASSERT (body1 == 0 || body1 != body2,"can't have
> body1==body2");
> However, an exception is made for bodies of the static
> environment... 
> My question is, does it ever make sense to add a joint
> between a body and itself, even bodies of the static
> environment? Am I overlooking some case where you
> might want to do this for the static environment?
> ____________________________________________________________________________________
> Do you Yahoo!?
> Everyone is raving about the all-new Yahoo! Mail beta.
> http://new.mail.yahoo.com
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode

More information about the ODE mailing list