Chapter 9

Cameras

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.

First-Person Camera

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 ...

Get Game Programming in C++: Creating 3D Games, First Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.