changed how onGround is caculated