[odejava] collision of two connected bodies

Hello,
I guess I’v got a newbie question. I currently performing some very basic tests with javaode. (I’m planning to use it in my masther thesis project.) I have created a world with a plane and two bodies connected with a hinge joint.
Everything works really nice, so far, but I don’t get collision detection for the two connected bodies working. I’m doing collision like in the javaode demo:

inside the “step” function it looks like this:
collision.collide(odeSpace);

    // Read & modify contact information
    iterateContacts();

    // Add all contacts to contact jointGroup
    collision.applyContacts();     

private void iterateContacts(){
int contactCount = collision.getContactCount();
Contact cList = contacts;

    for(int i=0; i< contactCount;i++){
        cList.setIndex(i);            cList.setMode(org.odejava.ode.Ode.dContactBounce | org.odejava.ode.Ode.dContactApprox1);
        
        cList.setBounce(0.1f);
        cList.setBounceVel(1f);
        cList.setMu(0.5f);
        
    }
}

The bodies will collide with the plane, properly, but not with each other. Both bodies are simple boxes and reside in the same Space.

Could anyone tell we if there i need to take special actions to enable collision of connected bodies? Or is there something wrong with my setup? (If I remove the joint both bodies will collide propperly.)

I already tried to call collision2(boxID1,boxID2) in the “step” method, but this makes the jvm crash.

Greetings,
Marcus

this is a limitation of Odejava and there is an old thread on it.

It is possible to re-enable this by recompiling the native code with a slight modification. Obviously a better solution would be to have this as a configurable option.

Will.