B. Flying and crouching. Recall that the player's height is set to be 32 units. This means that the player's eyes (imagine the player's eyes are exactly on top of the player's head) are looking straight at the walls at point 32. Since 32 is one half of the walls' height, having the player's height at 32 makes the player's eyes halfway between the floor and the ceiling (see next figure). What if we change this value? Surprisingly (or maybe not), the walls will shift either upward or downward depending on whether the player's height is increased or decreased. Thus, to make the player as if he/she is flying (or leaping), we can simply increase the player's height. Similarly, to make the player as if she/he is crouching, we can decrease the player's height. The height should not be allowed to be less than 0 or greater than walls' height, because doing that will make the player go over the ceiling or sink into the floor. The next figure shows why this method works. ![]() ![]() ![]() One counter intuitive aspect of this method is this:
|