Hi,
I just asked this question to the ODE mailing list and got the response below. I am not quite sure how to implement the suggestion with OdeJava. Are there any examples using nearCallBack methods for collisions? Any other suggestions on how to implement this would be greatly appreciated.
Thanks,
James
MY QUESTION:
Hi,
I’m hoping this is an easy one.
I have two bodies and I want them to be able to occupy the same position in the world without ode trying to shake them apart. Basically - like ghosts.
The thing is, I need regular physics to apply when they interact with other particular bodies (I have the body IDs in a list). Imagine something like, ghosts can pass through each other, but can’t go through walls.
I have tried to play with the ERP and CFM values for the contact I get back from their collision, but it doesn’t help. I can’t change the world values for these params, beause then everything becomes a ghost. How do I do this?
Your help is greatly appreciated - thanks in advance!
James
THE RESPONSE:
RE: Getting Bodies to pass through one another?
Ok, so you have your nearCallback function that has the two Geoms.
You can get the bodies for these Geom by dBodyID body = dGeomGetBody(geom);
Ok, so now you have the bodies.
If both of these bodies are the ones you don’t wont to collide, then return.
Return BEFORE dJointCreateContact is called.
Hope that helps.