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

Using Two Cameras

Normally when you watch television you sit back, relax, and let the show entertain you. While you’re sitting there relaxing, there’s a lot of hard work going on, especially in the TV director’s control room. Whether it’s a sporting event, a sitcom, the local news, or a soap opera, there are typically three or more cameras that are continuously being switched by the director.

In the following example, we will create two cameras around our cylinder and then switch to each one, using the HideEntity and ShowEntity commands. While the program is running, we’ll switch each camera as if we were big-time television directors!

We’ll make this demo07-02.bb. The first thing we’ll do is create two cameras:

; Create camera camera1=CreateCamera() ...

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