I just spent an hour hunting this particular bug and despite the fact I now know the cause - I still don’t know why.
Basically - I was adjusting the mass before adding a geom. The result was the the collisions wern’t happening.When I changed the order around - it worked again. Any idea why?
I’ve altered the Body method to warn against this:
public void adjustMass(float mass) {
if (geoms.size() == 0) {
System.out.println("Odejava - warn: geoms should be added before the mass is adjusted");
}
Ode.dMassAdjust(massId, mass);
Ode.dBodySetMass(bodyId, massId);
}
but I’d like to know the reason behind it before I commit it in.
On a related note - we probably need a better Odejava logging setup so developers can log such warnings.
Will.