Ok - this seems to be a major problem, so I’ve just opened a new thread for that.
I’ve found a very strange effect. If I scale the normal with an value >1 the objects seem to behave more ok, if the value <1 the strange effect increases.
I’ve changed the normal this way:
if (normalR != null) {
normal.m[0] = normalR.getValue(0);
normal.m[1] = normalR.getValue(4);
normal.m[2] = normalR.getValue(8);
}
else {
MathUtils.dMULTIPLY0_331 (normal,b1.R,normalC);
}
normal.scale(20f); // <- THIS IS MY CHANGE
invert_normal = !invert_normal; //SEEMS TO MAKE THE CODE WORK A BIT BETTER :-(
if (invert_normal) {
normal.scale(-1);
}
depth = -s;
Something I also found out: some boxes seem to disappear, when they collide. This is more or less independent of the scale value (at least I wasn’t able to see a major difference)