Ive got a very annoying problem in my game (platformer). If I put a lot of boxes in a row so it should behave like a "normal" Segment Shape (see red dots):

However my circle shaped entities stick sometimes on the corners (primary after jumping). I think its because of the slop of collisions.
After some research I found this code by Slembke:
Code: Select all
preSolve(...){
Return !(
arbiterCount(arb) == 2 &&
arbiterDepth(arb, 0) < slop && arbiterDepth(arb, 1) < slop &&
cpvdistsq(arbiterPoint(arb, 0), arbiterPoint(arb, 1)) < slop*slop*2.0f
);
}
So there could be several reasons: The code from above is pretty old. Does it work anymore? Is there a wrapper issue with arbiterCount(arb), or is it really everytime 1?
Or do you have an other idea for a fix for it?
I have one, but it would be needed to be preprocessed everytime (connect gaps by segment shapes).
Greetings Dario