I'm making a Mario game with custom movement, and I've run into an issue with landing. This is a small problem, but a bothersome one: I have it so that when he overlaps the ground at an offset of one pixel above, it sets his vertical speed to zero, but he almost always ends up one or two pixels into the ground.
It's never constant, though, so I can't just fudge the collision offset until it works. Obviously, I need a better way of telling when he lands and how to keep him even with the ground, but how?
EDIT: New question from a few posts down: is there any problem with using a combination of Platform behavior and Custom movement? All this jumping and landing stuff would be taken care of by the Platform behavior, but I'd make everything else -- speed/acceleration and whatnot -- custom. Would that work out if I did it right?