114 Video Game Design Foundations
edge is longer. The building must be proportionally increased in size. The 3D
engine increases the distance between the vertices to stretch the object.
Additionally, when the player moves around the scene, the vertices on objects
must move to show a change of direction. Figure 4-27 shows two cubes. Notice
the position of the character and vertices in Figure 4-27A. In Figure 4-27B, the
character has moved in the scene. The cube is exactly the same, just viewed from
a different angle. Notice the new positions for the vertices.
A B
Figure 4-26. A—Two buildings have been added to the scene. The building closest to the viewer appears proportionally
larger than the building farthest from the viewer. In reality, the models are the same size. B—Textures have been added to
the building models.
A B
Figure 4-27. A—The character is viewing the cube from one angle. B—As the character moves, the 3D engine moves
the vertices on the cube. The original vertices are shown in blue and the new locations are shown in red. Notice how the
lower-right vertex is now visible to the character, but the lower-left vertex is no longer visible.