3D Game Programming

(C. Jardin) #1

CHAPTER 13


Project: Build Your Own Solar System


Let’s take a break from our avatar to do something different, but just as cool:
animate the solar system. It will end up looking like this:

No, this isn’t a game, but it’s still fun.


14.1 Getting Started


Start a new project in ICE. Choose the 3D starter project template and name this
project Planets.

13.2 The Sun, Earth, and Mars


Since we’re dealing with space, we need to adjust the usual camera and switch
the renderer. We make these changes to the code that is aboveSTART CODING
ON THE NEXT LINE.

Create the camera so that it can see as far away as 1e6, which is a short way
of writing 1 with six zeros following it, or 1,000,000. Also, move the camera
1000 away from the center of the screen.

When you’re done with this chapter, you will


  • Know how to move things in circles

  • Understand how to make a sun light source

  • Be able to switch between two cameras in
    the same scene

  • Understand a mystery that took humans
    thousands of years to solve


Prepared exclusively for Michael Powell report erratum • discuss

Free download pdf