I'm making a platformer. Here is what I have so far: http://megaswf.com/s/2486396 (move around and jump with arrowkeys).
I'm using the ground's bitmap data to test collisions with the player's coordinates, and the player is sinking into the ground a few pixels (especially when walking uphill). To prevent this, I want the player's y coordinate to instantly change so that the player is sitting on top of the ground. Here is what I'm working on:
if (groundClipBmpData.hitTest(rLoc, 255, bLocFuture)) {
playerClip.y = ???
}
I want the player's y-coordinate to change to become the highest pixel of the groundClipBmpData at the player's x coordinate.
How can I do this?