I wrote this code so that my character can stand on this platform walk on it etc. But that doesn't happen and my character seems to just go through it. When I compile there aren't any syntax errors, so is there something missing from the code?
public boolean isOnSolidGround()
{
boolean isOnGround = false;
if (getY() > getWorld().getHeight() - 30) isOnGround = true;
int imageWidth = getImage().getWidth();
int imageHeight = getImage().getHeight();
if (getOneObjectAtOffset(imageWidth / -2, imageHeight / 2, Platform.class) != null||
getOneObjectAtOffset(imageWidth / 2, imageHeight / 2, Platform.class) != null)
isOnGround = true;
return isOnGround;
}

