It's been a while but I think it were things like:
- turning on slopes
- turning on "tunnels" with too near ceilings (or turning NOT in tunnels with too near ceilings but ending on wall)
All the collision polygons are rectangles. Increasing the overlap (0, -2...+) helps at (0, -4) but then I run into the problems of the original isByWall function.
Yes, this is one of the exact spots where that happens. The player has already landed on the corner of the platform. So it IS in fact ON the platform. There is no wall here. But he turns around sometimes (and more often on mobiles with lower performance).
The only reason I can imagine at the moment for this behaviour is:
My wall condition sometimes happen while the player is IN the platform (just before the platform behaviour moves him out). But this shouldn't happen! On the other side the varying jump highs SHOULDN'T happen either....