Chapter 8Project: Turning Our Avatar

When you’re done with this chapter, you will

  • Know even more fun math for 3D programming

  • Know how to rotate something to face a specific direction

  • Be able to make smooth animations

We’re nearly finished animating our avatar. In Chapter 4, Project: Moving Avatars, we learned how to make our avatar move. In Chapter 6, Project: Moving Hands and Feet, we made the avatar look like it was walking. Now we need to make it look as though it can turn when we switch directions. Turning, or rotating, is not new to us—we already make the avatar turn when flipping and cartwheeling. But this time we want to make our avatar face a particular direction.

Get 3D Game Programming for Kids now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.