O'Reilly logo

3D Game Programming for Teens, Second Edition by Eric Grebler, Maneesh Sethi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Orbiting (a.k.a. Pivoting)

What’s the difference between rotating and pivoting? Let’s look to the galaxies for our answer. Think of how the earth orbits around the sun. While the earth is rotating, it is also orbiting (in the case of Blitz3D we’ll call this pivoting) around the sun. The sun is set as the pivot point, and the earth orbits around it. Let’s re-create this scene and combine both rotating and orbiting using Blitz3D. To make our scene look a little more realistic, we’ll add a texture map to both the sun and the earth. On the CD you’ll find the two textures that were used: sunskin.jpg and earthskin.jpg.

The key to this program is the item called the pivot. Think of the pivot item as an invisible anchor that sets the point of rotation. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required