Gravity the ground and making a mech move

i cant find a good tutorial on how to land on oddly shaped ground or platforming much at all
im making a platformish game withfollowing the mouse for shooting, nothing special and i didnt think it would be hard but i cant find a platform tutorial that dosent have the char landing on boxs or flat ground,

so i tried an idea i heard from my friend about invisible movie clips to detect collision so i gave it a shot and it worked

i have one invisible boundary the stops left motion and another that stops right motion and another that stops downward motion and i put the on corresponding sides of the wall or ground and it works great but with one problem

the little vehicle animation i have sinks into the ground or wall just barely and then pushs itself back out, you almost cant tell but it looks really sloppy

has anyone else run into this problem

how do you guys deteced collision and stop downward or right left motion and still inculding gravity and friction(friction char slides a little bit more after you let go of the key)

when i get my laptop out later ill post all my code