This chapter covers how to switch from a 2D environment to a full 3D game, which requires several changes. The
Actor transform, including 3D rotations, becomes more complex. In addition, you need to load and draw 3D models. Finally, most 3D games have some type of lighting applied to the scene. The game project for this chapter demonstrates all these 3D techniques.
ActorTransform in 3D
The representation of the
Actor transform you have used so far in this book works for 2D graphics. However, supporting a fully 3D world requires some modification. Most obviously, the position
Vector3. But this brings up an important question: Which directions are x, y, and z in the world? Most 2D games use a coordinate ...