It was my cats fault, he was on my desk infront of me while I played and probably pressed the spacebar slightly with his butt.
But yeah you could clamp the minimum camera height or something so it can't get below the floor, that would get rid of the problem.
edit: that made no sense, spacebar makes you go up not down... idk what happened then XD