detect collision of two bodies by side

adq wrote:
Ok, should I check that in PreSolve or PostSolve?
I tried in Pre and it works, but sometimes 2 counts are returned when two bodies aren't contacting exactly by edges - the gap between them and angle is very small though.
What should I do to get exact edge contact detection?


I don't think you can actually, since polygon boundaries aren't exact. They're expanded or contracted (I forget which) a bit internally in the engine, so things are always going to be a bit "sloppy". The solution is to use a good scale so the slight error is visually insignificant. Also take a look at common.b2Settings.
Ok, but when I change scale, position of physical objects don't correspond to MovieClip position. So I can't.
Should I write my own b2Settings class or change the values directly?

Original thread: https://box2d.org/forum/viewtopic.php?t=5836