Added ceiling check for the player.