I know how to throw up barriers and hit detection and all, but for some reason whenever my character lands, he sinks 1 pixel lower with each landing. This happens for about an increase of getY()+8, then resets his landing to where it should be, then starts to sink 1 pixel lower with each landing again. He doesn't sink while on the ground, it is when he lands the next time around that he goes 1 pixel lower. Here is my code. (I also used "getOneIntersectingObject", and it had the same problem). My gravity method may be causing it, but I'm not sure.
Actor bottom;
bottom = getOneObjectAtOffset(0, 26, barriers.class );
if(bottom != null)
{
speedDown = 0;
Gravity = 0;
Ground = true;
canJump = true;
}
else
{
gCount++;
Ground = false;
canJump = false;
speedDown = speedDown;
}