The camera determines the player’s point of view in a 3D game world, and there are many different types of cameras. This chapter covers the implementation of four cameras: a first-person camera, a follow camera, an orbit camera, and a spline camera that follows paths. And because the camera often dictates the movement of the player character, this chapter also covers how to update movement code for different types of cameras.
A first-person camera shows the game world from the perspective of a character moving through the world. This type of camera is popular in first-person shooters such as Overwatch but also sees use in some role-playing games like Skyrim or narrative-based games such as Gone Home. Some ...