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

Working with Cameras

The camera acts as the eyes for the player of the game. Where you place the camera or cameras will directly determine the action that the player sees. Blitz3D makes it easy to manipulate the location, angle, and zoom level of our cameras. Most of the camera settings we will apply in this chapter will be performed on a simple cylinder. Before continuing, either open the program called demo07-01.bb or enter the following code:

; Lighting and Cameras ; ––––––––––––––––—— Graphics3D 640,480 SetBuffer BackBuffer() ; Create camera camera=CreateCamera() ; Creating a light light=CreateLight() ; This is the code for creating the cylinder cylinder=CreateCylinder() PositionEntity cylinder,0,0,5 EntityColor cylinder, 0,26,125 ; The following ...

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